Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 314
Jens Zastrow Avatar asked Dec 05 '13 15:12

Jens Zastrow


People also ask

How do I enable DNS hostname in VPC?

In this example, both DNS hostnames and DNS resolution are enabled. To update these settings, choose Actions and then choose Edit VPC settings. Select or clear Enable on the appropriate DNS attribute and choose Save changes.

How do I enable DNS support in VPC AWS?

To set up DNS in your VPC, ensure that DNS hostnames and DNS resolution are both enabled in your VPC. The VPC network attributes enableDnsHostnames and enableDnsSupport must be set to true . To view and modify these attributes, go to the VPC console at https://console.aws.amazon.com/vpc/ .


1 Answers

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

like image 183
captainblack Avatar answered Sep 19 '22 09:09

captainblack