How to detach and delete Elastic network interface

0

I am trying to delete all the resources I created in AWS,I have terminated all ec2 instances,the only resources I have remaining are Elastic network interface,1 database security group,1subnet and 1 private route table and 1 vpc.Now it appears the only way I can delete every other resource is to first delete network interface and the only way I can delete network interface is to first detach network interface,so when I tried to detach network interface,I got error message 👇 "Failed to detach the network interface. API error: "You do not have permission to access the specified resource." After some research I decided to create I AM policy for detaching network interface and subsequently attach the policy to a role,after attaching the policy to a role I still found it impossible to detach the network interface.I need help on a solution to resolve this problem. Thanks

loui
asked 13 days ago140 views
1 Answer
3
Accepted Answer

Hello.

Please check the "Description" of the ENI that cannot be deleted.
If you check the "Description", there may be an AWS service that uses the ENI listed.
I suspect that the ENI is probably being used by some AWS service and cannot be deleted.
https://repost.aws/knowledge-center/vpc-delete-elastic-network-interface

A common problem is forgetting to remove RDS or forgetting to remove RDS Proxy.
In addition, if the VPC endpoint is using an ENI or if ALB or NAT Gateway remains, the ENI cannot be deleted.
https://repost.aws/knowledge-center/vpc-delete-requester-managed-endpoint

profile picture
EXPERT
answered 13 days ago
profile picture
EXPERT
reviewed 12 days ago
profile pictureAWS
EXPERT
reviewed 13 days ago
  • Thanks, it worked,It turns out I haven’t deleted RDS,from my observation after deleting the RDS it made it possible to be able to delete the vpc and this authomatically detached the network interface,I have been able to learn quite alot in this process. Thanks once more

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