By using AWS re:Post, you agree to the Terms of Use
/Network interfaces is in use, cannot be deleted/

Network interfaces is in use, cannot be deleted


Hi all, I was doing a Udemy course to work with EKS. After I finished, I deleted EC2 instances created by EKS, removed EKS cluster. Deleted elastic IP and load balancer. Now I want to clean up everything else. However, I can't delete Security groups, VPSc, Subnets, Network ACLs. Most of them say that I have associated networks interfaces. I try to delete the interfaces with ui and console but it says that they are in use. Detach also doesn't work and I have already released elastic IPs. I also went to ColoudFormation and tried to remove the stack there. What else I'm missing??

3 Answers


Please check out the documentation of Elastic Network Interface, there is a part regarding detaching and deletion of the resource:

Also please make sure to check out the "Description" field of ENI, you will find there information what this ENI was used for, for example:

  • DMS: "DMSNetworkInterface"
  • ElastiCache: "ElastiCache node-name"
  • ALB: "ELB app/alb-name/auto-id"
  • NLB: "ELB net/nlb-name/auto-id"

Sometimes time may be the issue as well - if you have deleted the load balancers, IPs etc., you might wait a little until ENI updates itself and you should be able to delete it.

answered 4 months ago
  • I tried all of that which mentioned in the guide. I just can't either detach Eni or delete. it says Attachment status Attached. Network interface status: In-use. In use by what I don't get it as I delete EC2 instances


First of all, if you created the resource using eksctl create cluster, you should attempt cleanup using eksctl delete cluster command.

At the minimal you might want to delete the CloudFormation stack, instead of manually delete resources.

That said, if the only issue you face as of now is the ENI cannot be detached, you can force detachment using the --force option of the detach-network-interface CLI command, refer here.

Lastly, you should provide feedback to Udemy course instructor for better clean up instructions. And AWS has it's free (you still need to pay for the resource usage) workshops here.

answered 4 months ago
  • About 1st: I deleted a cluster with AWS interface. Now I can't use that command as I don't know the cluster name I tried to remove CloudFormation stack as mentioned I mentioned. It says status: DELETE_FAILED. "The vpc 'vpc-0270611f0423cb589' has dependencies and cannot be deleted. (Service: AmazonEC2; Status Code: 400; Error Code: DependencyViolation; Request ID: 9e166853-916c-4d69-be50-60343bdecc9f; Proxy: null) The subnet 'subnet-018b2d03759cc821e' has dependencies and cannot be deleted" I tried now to detach with CLI as you advised but it give an error as well( :: An error occurred (OperationNotPermitted) when calling the DetachNetworkInterface operation: You are not allowed to manage 'ela-attach' attachments.

    About the last one, will as I tried of this I am at least 1 week try to clean up. I wrote to Amazon but they say they don't provide tech support on a free plan. He sent me a few links I tried all in documentation, nothing has helped me


The easy path for this is, go in the console to EC2, then to Elastic Network Interfaces, and next to every interface you will find which service is using it, so delete the service and the ENI will fly away.


answered 4 months ago
  • Sure I tried it. I mentioned it my question. It says: "The network interface can't be deleted. Network interface is currently in use."

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