You need to enable JavaScript to run this app.
最新活动
大模型
产品
解决方案
定价
生态与合作
支持与服务
开发者
了解我们

无法删除AWS VPC:网络接口eni-ce2a0d10占用报错求助

解决AWS VPC删除报错:Network interface 'eni-ce2a0d10' is currently in use

Got it, let's fix this VPC deletion error for you! The error points to an in-use elastic network interface (ENI), and while EC2 instances are a common suspect, this ENI could also be tied to other AWS services. Here's a step-by-step breakdown to resolve the issue:

Step 1: Track down which resource is using the problematic ENI

  • Open the EC2 Console and navigate to Network Interfaces in the left sidebar.
  • Search for the ENI ID from your error: eni-ce2a0d10.
  • Click into the ENI's details page, then check the Attachment section. This will clearly show you which resource is using the ENI—could be an EC2 instance ID, a load balancer ARN, a RDS instance ID, or even a Lambda function with VPC access.

Step 2: Release the ENI from its associated resource

The fix depends on what's holding onto the ENI:

  • If it's an EC2 instance:
    • If you don't need the instance anymore, terminate it. Wait until its status changes to terminated—this will automatically detach and delete the ENI (especially if it's the instance's primary ENI).
    • If you need to keep the instance, you can detach secondary ENIs (note: primary ENIs can't be detached without terminating the instance).
  • If it's a Load Balancer (ALB/NLB/CLB):
    • Delete the load balancer, or reconfigure it to use subnets in a different VPC. Once the LB is deleted or reconfigured, the ENI will be released.
  • If it's a managed service (RDS/ElastiCache/Redshift):
    • Modify the service's settings to move it out of this VPC, or delete the resource entirely. This will free up the associated ENI.
  • If it's a Lambda function:
    • Edit the Lambda's VPC configuration to disable VPC access, or switch it to use subnets in another VPC. Wait a few minutes for AWS to release the ENI.

Step 3: Confirm the ENI is available or deleted

  • Return to the Network Interfaces page. Check that eni-ce2a0d10 shows a status of available, or that it's no longer listed (some services automatically delete unused ENIs).
  • If it's still there and available, you can manually delete it by right-clicking the ENI and selecting Delete Network Interface.

Step 4: Retry deleting the VPC

Head back to the VPC Console, find vpc-0a72ac71, and attempt to delete it again. The error should be resolved now that the ENI is no longer in use.

内容的提问来源于stack exchange,提问作者Kamran Bigdely

火山引擎 最新活动