If I try deleting the security group in aws, error showing up saying cant delete because of running network interfaces. I am unable to delete network interfaces too
can anyone help me out to forcefully delete all the network interfaces in AWS.
though I have deleted all the running instances, all the key pairs and everything in the backend. still I cant delete the specific security group and its network interfaces.
i tried deleting security group first, error saying first need to delete Network Interfaces
2
Answers
You have to remove the security group from the network interfaces it is assigned to before you can delete it. There might still be network interfaces that are attached to stopped instances or that were manually created and not associated with an instance. See AWS docs link below to find your network interfaces and modify or delete them.
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-eni.html#view_eni_details
I once had this issue and it turned out that I had Lambdas using this interface. AWS Support pointed me to this page. Specifically it has a reference to how to use Lambda ENI Finder tool to detect which, if any, Lambda is using that interface.