AWS:EC2 enable dns-hostname for host in non default vpc

Jens Zastrow picture Jens Zastrow · Dec 5, 2013 · Viewed 9.4k times · Source

I have a non-default vpc where i want to launch instances. The docs http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-vpc.html say:

Non-default vpc: "DNS hostnames are disabled by default."

Currently there is no option to set in during ec2-launch with "aws ec2 run-instances".

http://docs.aws.amazon.com/cli/latest/reference/ec2/run-instances.html

Any idea?

Answer

captainblack picture captainblack · Mar 6, 2017

To enable DNS resolution and DNS hostnames for your VPC, open the VPC Management Console > Your VPCs. Click on your VPC and then click on Actions and then enable both Edit DNS Resolution & Edit DNS Hostnames.

enter image description here