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年前3447ビュー
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年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ