DEV Community

Revathi Joshi for AWS Community Builders

Posted on

How to delete ENI's

An elastic network interface is a logical networking component in a VPC that represents a virtual network card.

Certain times, you might come across issues when trying to manually detach the Network Interfaces. Some of the errors are

eni-xxxxxxx: You do not have permission to access the specified resource.

“Error detaching network interface. eni-xxxxxxxx: You are not allowed to manage ‘ela-attach’ attachments.”

Network interface ‘eni-xxxxxxxx’ is currently in use.”

Please visit my GitHub Repository for VPC articles on various topics being updated on constant basis.

Let’s get started!

Objectives:

1. Detach Network Interfaces

2. Delete Network Interfaces

3. Find out and review the Description to find which resource the elastic network interface is attached to

4. Delete the described service

Pre-requisites:

  • AWS user account with admin access, not a root account.

Resources Used:

Elastic network interfaces

Steps for implementation to this project:

1. Detach Network Interfaces

  • not able to detach

Image description

2. Delete Network Interfaces

  • not able to delete

Image description

3. Find out and review the Description to which resource the elastic network interface is attached to

  • Navigate to Network Interfaces in the EC2 console.

Image description

  • Select the ENI and open the Details tab.
  • Review the Description to find which resource the elastic network interface is attached to. Image description

4. Delete the described service

  • delete the described service if not being used. (ENI will automatically be deleted if the service is deleted).

Image description

Image description

  • Status - Deleting

Image description

  • Wait for 4-5 min

  • All got deleted

Image description

5. What we have done so far

  • We successfully deleted all the un-used ENI's.

Top comments (1)

Collapse
 
atman_atos_95085d8eb48fdd profile image
Atman Atos

The main point from this post for me is "Review the Description to find which resource the elastic network interface is attached to.". Once this is done you can find your way to the service and delete it(search the left nav bar). Then you will have access to delete what you already meant to.