Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in AWS by (12.9k points)

I created an internet gateway in AWS VPC dashboard, I attached it to a VPC then I want to detach it but I keep getting this error:

Network vpc-xxxx has some mapped public adresses, Please unmap those public addresses before detaching the gateway. ( Service: AmazonEC2; Status Code: 400; Error Code: DependencyViolation; Request ID: qfdqsdf)

What to do to detache this IGW ? Why exactly do I get this error?

I need to get rid of this IGW without deleting extra resources. please any ideas?

For information, the route table of the VPC does contain public addresses but they are routed to other targets. This IGW is not set as target anywhere.

closed

1 Answer

+1 vote
by (18.2k points)
selected by
 
Best answer

Make sure that your route tables don't refer to the Internet gateway that you are trying to delete.

Another reason for this error might be that one of the resources in your VPC has been assigned an elastic IP address. You will have to delete the Elastic IP address before you can delete your Internet Gateway. In case the IP addresses were auto-assigned to the instances, you will have to stop the instances to remove the public IP addresses.

Related questions

0 votes
1 answer
asked Sep 14, 2020 in AWS by Justin (7k points)

Want to get 50% Hike on your Salary?

Learn how we helped 50,000+ professionals like you !

0 votes
1 answer

Browse Categories

...