So you need to delete an AWS Internet Gateway, sounds good.
You navigate to the VPC (Virtual Private Cloud) dashboard and go to Internet Gateways.
At this stage you select “Actions” and choose the “Detach VPC” option.
In a perfect world, this would return a “success” and the IG would be deleted.
But sometimes this isn’t the case and you have to do a little more.
In this instance, you need to figure out what other services (network resources) are using this IG.
“Network vpc-0d76c3d712e21f766 has some mapped public address(es). Please unmap those public address(es) before detaching the gateway.”
Can’t delete AWS Internet Gateway
At this stage you need to determine which services could be using this Internet Gateway resource.
This could be EC2 instances, RDS instances, a Redshift cluster, a VPC NAT Gateway, or many other internal AWS services.
Delete associated NAT gateways if applicable.
At this stage, we are now able to the delete the Internet Gateway: