How do I find the IP(s) blocking deletion of an InternetGateway?

0

I am trying to delete a CloudFormation stack, but have run into errors deleting a few resources. Of 28 resources, 5 failed to delete: AWS::EC2::InternetGateway, 2x AWS::EC2::Subnet, AWS::EC2::VPC, and AWS::EC2::VPCGatewayAttachment. The InternetGateway, Subnets, and VPC all show an error stating there are dependencies and cannot be deleted. The VPCGatewayAttachment says the VPC "has some mapped public address(es). Please unmap those public address(es) before detaching the gateway."

If I try an manually detach the InternetGateway from the VPC, I get the same error that the VPC "has some mapped public address(es). Please unmap those public address(es) before detaching the gateway."

I cannot find any Elastic IPs in this VPC that haven't already been deleted. How do I find what is preventing these resources from deleting?

已提问 2 年前3522 查看次数
2 回答
0

The first thing I would try is to run aws ec2 describe-addresses using the AWS CLI and then track down the instance(s) using those IPs by looking at their network interface.

profile pictureAWS
专家
已回答 2 年前
0

If the aws ec2 describe-addresses from the other answer does not work, please check that you have deleted any NAT Gateway(s). They have EIPs and have caused for me a similar issue that you are seeing

profile pictureAWS
已回答 2 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则