Issues deleting VPC

0

When I try to delete my VPC, it says it has dependencies, namely, the Network Interface. So I go to the Network Interface, and it says I do not have permissions when I try to detach it, I am the root user. I am getting charged by the hour of use for a VPC that I no longer need.

Jacob
asked a month ago364 views
1 Answer
0
Accepted Answer

Hello.

First, we need to find out which resource the network interface is associated with.
For example, are there any EC2s, ALBs, other VPC endpoints or NAT Gateways left?
If you were using something like RDS Proxy, you need to remove RDS Proxy.
Have you ever created a Lambda connected to a VPC?
If these resources remain, the network interface cannot be deleted unless they are deleted.
https://repost.aws/knowledge-center/troubleshoot-dependency-error-delete-vpc

profile picture
EXPERT
answered a month ago
profile picture
EXPERT
reviewed a month ago
  • There are no Endpoints, and no NAT Gateways left, I followed that link you suggested and got, the InternetGatewayId, SubnetId, RouteTableId, NetworkAclId, GroupId, and NetworkInterfaceId. What order should I delete these in?

  • Follow the steps below to check the ENI description and see which resource it is linked to. After checking, delete the linked resources.

    1. Open the Amazon EC2 console.
    2. Select the AWS Region that the Amazon VPC is in.
    3. In the navigation pane, under Network Interfaces, search for the VPC ID of the Amazon VPC that you're deleting.
    4. Select the network interface and choose the Details tab.
    5. Review the Description to see which resources the network interface is attached to.
  • Ok, I did that, I can now see the interface ID, VPC ID, status, type, subnetID and Securitygroup, attachmentID. I cannot delete the subnetID or Securitygroup though. Is there something I am missing?

  • Delete the resources using that ENI first.

  • Hi Riku, thanks for your responses, figured it out

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions