- Newest
- Most votes
- Most comments
I understand your frustration with being unable to delete your VPC and continuing to incur charges. This is a common issue that many AWS users face. The problem usually stems from dependencies that are still attached to your VPC, preventing its deletion. Here's how you can approach this:
-
First, check for any resources still running in your VPC. This could include EC2 instances, RDS databases, Load Balancers, NAT Gateways, or Lambda functions connected to the VPC.
-
Pay special attention to network interfaces. These are often the culprits preventing VPC deletion. However, you may find that you can't delete these interfaces directly.
-
Look for any VPC endpoints that might be associated with your VPC. These can sometimes be "requester-managed" endpoints created by AWS services like ElastiCache Serverless or RDS Proxy.
-
If you find any such services or resources, you need to delete them first. For example, if you have an ElastiCache Serverless cluster, delete that resource.
-
After deleting these resources, wait for a few minutes. AWS should automatically clean up the associated endpoints and network interfaces.
-
Once all dependencies are removed, try deleting the VPC again.
If you're still unable to delete the VPC after following these steps, you may need to use the AWS CLI to get more detailed error messages. The AWS Management Console doesn't always show all the information.
As a last resort, if you can't identify the service or resource causing the issue, you may need to contact AWS Support. They can provide account-specific guidance and help identify any hidden dependencies in your setup.
Remember, the key to resolving this issue is to focus on removing the underlying services or resources that are creating dependencies, rather than trying to delete network interfaces or endpoints directly.
Sources
Issues Deleting VPC | AWS re:Post
Can not delete VPC. Endpoint does not exist. | AWS re:Post
Unable to Delete VPC Due to Requester-Managed VPC Endpoint and Network Interface Dependencies | AWS re:Post
VPC do not cost money, however, resources within the VPC will. There are 2 easy ways to find the resources within a VPC.
- Check the billing console, either the actual bill or cost explorer.
- Check the elastic network interfaces section from the EC2 menu. Confirm the eni are attached to the desired VPC. Then, you can delete the eni or the resources that created the eni.
If you are confident you have deleted all the resources, then, maybe there is a Nat gateway attached to it.
Relevant content
- asked 2 years ago
- asked 2 years ago
- asked 3 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
