7
votes

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?

2

2 Answers

8
votes

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

3
votes

DNS resolution is on a per-VPC basis, not per-instance. You can enable DNS hostnames by finding the VPC in the VPC management console and Enabling DNS hostname support.

enter image description here