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
已提問 1 個月前檢視次數 164 次
1 個回答
3
已接受的答案

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
專家
已回答 1 個月前
profile picture
專家
已審閱 1 個月前
profile pictureAWS
專家
已審閱 1 個月前
  • 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

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南