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.
To delete an internet gatewayOpen the Amazon VPC console at https://console.aws.amazon.com/vpc/ . In the navigation pane, choose Internet gateways. Select the internet gateway and choose Actions, Delete internet gateway.
In the navigation pane, under Network Interfaces, search for the VPC ID of the Amazon VPC that you're deleting. Select the network interface and choose the Details tab. Review the Description to see which resources the network interface is attached to. Delete the associated resources.
NAT gateway creation fails A failed NAT gateway is automatically deleted, usually in about an hour. There was an error when the NAT gateway was created. The returned state message provides the reason for the error. To view the error message, open the Amazon VPC console, and then choose NAT Gateways.
You have some resources in the VPC that have been assigned a Public IP address, such as:
These IP addresses might have been assigned as an Elastic IP address or as an "auto-assign Public IP address" no instance creation.
You will need to delete these Elastic IP addresses before the Internet Gateway can be removed. If they were auto-assigned IP addresses, then Stop the instances to remove the public IP addresses.
You might also need to edit your Route Tables so that they do not refer to the Internet Gateway.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With