Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I flush DNS entries in my VPC in AWS?

I recently added VPC Endpoints to my CloudFormation stack. I then deleted my stack and tried to recreate it.

When I tried to recreate it, I got the following error:

private-dns-enabled cannot be set because there is already a conflicting DNS domain for secretsmanager.us-east-2.amazonaws.com in the VPC vpc-63170e0b (Service: AmazonEC2; Status Code: 400; Error Code: InvalidParameter; Request ID: b7d28d81-c2c0-4f44-9642-f22171cf513d)

I suspect the error is here because the VPC's private DNS still has an entry from the last time the stack was created.

Is there a way to manually remove entries from the private DNS of the VPC?

like image 256
merlin2011 Avatar asked Oct 09 '19 18:10

merlin2011


People also ask

Where are VPC DNS settings configured?

It's located at the address 169.254. 169.253 (and the reserved IP address at the base of the VPC IPv4 network range, plus two) and fd00:ec2::253. For example, the Amazon DNS Server on a 10.0. 0.0/16 network is located at 10.0.

How does DNS work in AWS VPC?

Domain Name System (DNS) is a standard by which names used on the internet are resolved to their corresponding IP addresses. A DNS hostname uniquely names a computer and consists of a host name and a domain name. DNS servers resolve DNS hostnames to their corresponding IP addresses.


1 Answers

I received a similar error when trying to rename and VPC endpoint in a CloudFormation stack.
There is no option to wait, so I fixed it by using the following steps:

  • Log into the AWS Console
  • Navigate to VPC -> Vitual Private Cloud -> Endpoints
  • In the list of Endpoints, find the entry causing the issue
  • CLick on the entry and select Actions -> Delete Endpoint
  • Wait for deletion (can take a few minutes)

I then reran my CloudFormation stack and all worked.

like image 200
Ralph Willgoss Avatar answered Sep 25 '22 17:09

Ralph Willgoss