- Newest
- Most votes
- Most comments
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
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
Relevant content
asked 3 years ago
asked 2 months 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.
From the result of the command below, "EnableDnsSupport" is true, so DNS settings are enabled in the VPC.