Skip to content

Stuck Lambda-managed ENIs for 2+ weeks blocking CloudFormation security group deletion

0

I removed VPC configuration from Lambda function "legallm-export-pdf-worker-prod" in us-east-1, but 2 Lambda-managed ENIs remain and block CloudFormation cleanup.

Account: 142530420275 Region: us-east-1 Stack: LegalLM-Lambda-prod Failing logical resource: WorkerLambdaSg7861B44F SG: sg-0ddbe1e100622af0e

ENIs: eni-031af0d69c1ee4b82 eni-0c05b8613c34a9fc1

ENI status: available, attachment None Function VpcConfig: empty (SubnetIds: [], SecurityGroupIds: [], VpcId: "") Versions: only $LATEST Aliases: none

  • Event source mappings still enabled for SQS (normal worker setup)
  • No MSK/MQ/DocDB/AMP scrapers in this account/region
  • awslabs/aws-support-tools/Lambda/FindEniMappings reports no function/version using these subnet+SG combinations and suggests ENIs may be stuck.

Please advise AWS-side cleanup/reconciliation steps for these Lambda-managed ENIs so CloudFormation can delete the SG.

aws ec2 describe-network-interfaces \
  --filters Name=group-id,Values=sg-0ddbe1e100622af0e \
  --region us-east-1 \
  --query 'NetworkInterfaces[*].[NetworkInterfaceId,Status,Attachment.AttachmentId,Description]' \
  --output table
-----------------------------------------------------------------------------------------------------
|                                     DescribeNetworkInterfaces                                     |
+------------------------+------------+-------+-----------------------------------------------------+
|  eni-031af0d69c1ee4b82 |  available |  None |  AWS Lambda VPC ENI-legallm-export-pdf-worker-prod  |
|  eni-0c05b8613c34a9fc1 |  available |  None |  AWS Lambda VPC ENI-legallm-export-pdf-worker-prod  |
+------------------------+------------+-------+-----------------------------------------------------+
1 Answer
0

Hello.

Lambda's ENI is probably RequesterManaged: true, so it will not disappear unless you delete Lambda.
Does anyone in your account use VPC Lambda other than Lambda created with CloudFormation?
If another Lambda is connected to VPC, please delete it as well.

If another Lambda is connected to VPC, please delete it as well. https://www.reddit.com/r/aws/comments/dytfmy/unable_to_delete_network_interface_likely_due_to/
https://repost.aws/knowledge-center/lambda-eni-find-delete

It's a Japanese blog, but please check this as well.
https://blog.serverworks.co.jp/Lambda-eni-delete

EXPERT
answered 17 days 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.