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개 답변
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년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠