- Más nuevo
- Más votos
- Más comentarios
Here are some of common cases:
- Active load balancer that was attached to the ENIs
- Active RDS instances
- DMS Replication Instance
- VPC links from API gateway
- VPC Endpoint services
- Unused NAT gateways
- Unused ECS/EKS clusters
You'd need to delete these resources first based on what's applicable in your case. Note that these are just few common services, where we see this attached but there can be others too.
See, where are your security groups being used, can you detach security groups from those resources first, then try deleting the security groups first, if you see issues removing security groups, remove inbound/outbound rules from the security groups, then try deleting the security groups and then ENIs
Additional command references:
-
aws ec2 delete-network-interface --network-interface-id <eni-name>
-
aws ec2 describe-network-interfaces --filters 'Name=vpc-id,Values='$vpc | grep NetworkInterfaceId
Also, if you have support plan, I'd suggest you to reach out to AWS Support by logging a case under Technical category. They are well equipped to address the issue in a precise way if none of the above helps.
Hope you find this helpful.
Comment here if you have additional questions, happy to help.
Abhishek
Hello.
I think the network interface is being used by other services and therefore cannot be deleted.
First, we need to identify what service the ENI is used for.
Please check the ENI's Description for clues that may identify some services.
I think it is connected to a lambda,
Description AWS Lambda VPC ENI-sam-spring-SamSpringApplication-lnVfK9xEpuZT-d2007dad-7a8b-4608-82f4-dac984ccc67d
Right ?
Yes. I believe it is the ENI used by Lambda. So, you must first delete the Lambda VPC configuration or remove the Lambda if it is not needed.
Hey Riku, thanks for your answer, It is connected to 2 subnets. I think you are referring to the details panel here right? Enter image description here
But it couldn't be deleted from subnet
Thanks, secondabhi, Is there any AWS CLI command to list VPC or Network interface dependencies, please
Contenido relevante
- OFICIAL DE AWSActualizada hace un año
This can be confirmed by selecting Network Interface → ENI from the Management Console. The following image is an ENI for Lambda, but the description may include details that identify the service.
Run the following command to see the ENI description.
From ENI's description, it seems that they have tied Lambda to the VPC. First, remove the VPC settings for that Lambda. If the Lambda is not needed, the entire Lambda can be deleted. If the ENI status changes from in-use after that, it can be deleted. https://repost.aws/knowledge-center/lambda-eni-find-delete