Skip to content

Cant delete ENI

0

I was trying to delete a VPC in which i set up a K8s cluster using EKS, then I stumbled upon this:

"Network interface is currently in use and is of type lambda"

I checked in Lambda console and found no function there. Ive searched and found only 1 person w the same problem, without a proper solution. Anyone can help me with this?

1 Answer
1

Thank you for reaching out about your issue with deleting a VPC that contained an EKS cluster. The error message you're seeing suggests that there's a Lambda-created network interface still associated with your VPC, even though you don't see any Lambda functions in the console.

This is a known situation that can occur, and there are a few steps we can take to resolve it:

  1. First, we need to identify which Lambda functions or versions might be using this network interface. AWS provides a tool called the Lambda ENI Finder for this purpose. You can find instructions on how to use this tool in our Knowledge Center article: Why can't I detach or delete an elastic network interface that Lambda created?.

  2. If the Lambda ENI Finder doesn't show any functions using the network interface, we should check if any event source mappings are using it. This could be from services like Amazon MSK, self-managed Kafka, Amazon MQ, or Amazon DocumentDB. You can check this using either the AWS CLI or the Lambda console. Please also refer the above article.

Once we've identified what's using the network interface, we can take appropriate action:

  • For unpublished Lambda function versions, you can change the VPC configuration or disconnect them from the VPC.
  • For published Lambda function versions, you'll need to delete them.
  • For event source mappings, you can turn them off or delete them.

After taking these actions, run the Lambda ENI Finder again to verify that the network interface is no longer in use.

If all of the above steps are completed and there are no more associations, Lambda should automatically delete the network interface.

answered 2 years ago

EXPERT

reviewed 2 years ago

AWS
EXPERT

revised 2 years ago

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.