Skip to content

Cannot Enable DNS Support & Hostnames for VPC

0

I created multiple VPCs in us-east-1, and in us-east-2, but AWS is not allowing me to enable EnableDnsSupport and EnableDnsHostnames.

I have tried modifying attributes via CLI, manually in AWS Console, and switching regions.
Running describe-vpcs shows null for both values.
This is blocking private DNS resolution for my VPC Endpoint.
AWS should enable these settings by default.

How can I fix this, or is this an AWS backend issue?

Note: I am a student, and this is a lab I am trying to run based on my given instructions, but I can't even dig into it because my resources won't provision properly. I will delete this entire resource afterward; this is not something that will be used under real load/production.

2 Answers
2

Hello.

Are any errors occurring when changing settings?
Also, can I check the VPC DNS settings using the "describe-vpc-attribute" command?
"EnableDnsSupport" included in the response is basically never null, so there may be a problem or a restriction on the AWS account side.
https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ec2/describe-vpc-attribute.html

aws ec2 describe-vpc-attribute --vpc-id vpc-a01106c2 --attribute enableDnsSupport
aws ec2 describe-vpc-attribute --vpc-id vpc-a01106c2 --attribute enableDnsHostnames
EXPERT

answered a year ago

EXPERT

reviewed a year ago

  • DnsSupport is not included in the response of the "describe-vpcs" command, so it is natural that it will be Null. If you want to see the contents of DnsSupport, use the "describe-vpc-attribute" command. https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ec2/describe-vpcs.html#output

    Execute the command below without adding any options such as queries.

    aws ec2 describe-vpc-attribute --vpc-id vpc-0c1b3c572741953fd --attribute enableDnsSupport
    aws ec2 describe-vpc-attribute --vpc-id vpc-0c1b3c572741953fd --attribute enableDnsHostnames
    

    From the result of the command below, "EnableDnsSupport" is true, so DNS settings are enabled in the VPC.

    Here is the "describe-vpc-attribute" output:

    ~ $ aws ec2 describe-vpc-attribute --vpc-id vpc-0c1b3c572741953fd --attribute enableDnsSupport --region us-west-2 { "EnableDnsSupport": { "Value": true }, "VpcId": "vpc-0c1b3c572741953fd" } ~ $

0

Here is the output it keeps giving me from these commands, in us-east-1, us-east-2, and us-west-2:

~ $ aws ec2 describe-vpcs --vpc-ids vpc-0c1b3c572741953fd --region us-west-2 --query "Vpcs[0].{DnsSupport:EnableDnsSupport, DnsHostnames:EnableDnsHostnames}"

~ $ aws ec2 modify-vpc-attribute --vpc-id vpc-0c1b3c572741953fd --region us-west-2 --enable-dns-support

~ $ aws ec2 modify-vpc-attribute --vpc-id vpc-0c1b3c572741953fd --region us-west-2 --enable-dns-hostnames

~ $ aws ec2 describe-vpcs --vpc-ids vpc-0c1b3c572741953fd --region us-west-2 --query "Vpcs[0].{DnsSupport:EnableDnsSupport, DnsHostnames:EnableDnsHostnames}"

{ "DnsSupport": null, "DnsHostnames": null } ~ $

I run debug commands, and nothing seems out of the ordinary regarding errors that I can see.

aws ec2 modify-vpc-attribute --vpc-id vpc-0c1b3c572741953fd --region us-west-2 --enable-dns-support --debug

aws ec2 modify-vpc-attribute --vpc-id vpc-0c1b3c572741953fd --region us-west-2 --enable-dns-hostnames --debug

Here is the "describe-vpc-attribute" output:

~ $ aws ec2 describe-vpc-attribute --vpc-id vpc-0c1b3c572741953fd --attribute enableDnsSupport --region us-west-2 { "EnableDnsSupport": { "Value": true }, "VpcId": "vpc-0c1b3c572741953fd" } ~ $

But I am still getting the null output mentioned above. I wonder if this has to do with an account-level restriction (basic support account) that is preventing modifications. But if that's the case I don't know why or how to get around that.

answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.