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 Risposte
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
ESPERTO
con risposta 2 anni fa
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
con risposta 2 anni fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande