How can I delete my VPC that is shared with another AWS account?
2 minute read
Why can't I delete my Amazon Virtual Private Cloud (Amazon VPC) that's shared with another AWS account?
When deleting a VPC that's shared with another AWS account, it's a best practice to review any dependencies and active components within the shared resources before deleting the VPC. The most common errors that occur when deleting shared VPCs are:
"Unable to delete, the VPC contains one or more in-use network interfaces."
"Network interface associated - Delete the network interface, or associate with a different security group."
To verify shared subnets and active resources, do the following:
Verify that the Resource shares ID matches the shared resources in the parent VPC.
Review the resource type and verify that the resource is in the Available state.
After identifying the resources, select Leave resource share. This un-shares the resources from the parent VPC.
Delete the shared VPC.
Un-sharing subnets doesn't have a direct impact on the active resources. However, you must terminate all active resources within the shared or un-shared VPC to delete the parent VPC. To verify active resources, do the following: