How delete networking interface asociate with VPC?

0

The network interface was created by AWSGlueServiceRole-redshift and we've confirmed that no active Glue jobs or Redshift integrations are using it. But it won't let me delete it. How can I resolve this issue? Thanks.

  • Sometimes the network interface is still attached when not in use. From past experience with Lambda network interface, it can take 40-60 mins before you can delete it provided you have the right permissions.

asked 12 days ago47 views
2 Answers
0

To delete a network interface associated with a VPC, especially one created by an AWS service role like AWSGlueServiceRole-redshift, you need to follow a few steps:

  1. First, ensure that the network interface is not in use. You've already confirmed that no active Glue jobs or Redshift integrations are using it, which is a good start.

  2. Check the "Description" of the Elastic Network Interface (ENI) in the EC2 console. This may provide information about which AWS service is using the ENI.

  3. If the ENI is still showing as in use, wait for about an hour. Sometimes, AWS services like Lambda can take up to an hour to automatically delete their associated network interfaces after the service is no longer using them.

  4. If the issue persists, try to force detach the network interface using the AWS CLI command:

    aws ec2 detach-network-interface --attachment-id <attachment-id> --force

  5. Once detached, you can attempt to delete the network interface through the EC2 console:

    • Open the Amazon EC2 console
    • Navigate to "Network Interfaces" in the sidebar
    • Select the network interface you want to delete
    • Choose "Actions" then "Delete"
  6. If you're still unable to delete the interface, check for any remaining AWS resources that might be using it, such as:

    • Old versions of Lambda functions
    • VPC endpoints
    • RDS instances or RDS Proxy
    • ALB (Application Load Balancer) or NAT Gateway
  7. Ensure you have the necessary permissions to delete network interfaces. You may need to add permissions like ec2:DeleteNetworkInterface to your IAM role if you don't already have them.

If none of these steps resolve the issue, it may be worth contacting AWS Support for further assistance, as there could be an underlying issue specific to your account or setup.
Sources
How to detach and delete Elastic network interface | AWS re:Post
Unable to Delete network interface due link with Lambda | AWS re:Post
Delete a network interface - Amazon Elastic Compute Cloud

profile picture
answered 12 days ago
0

Hi there, I have faced the same thing once when I was testing AWS Glue and Redshift.

When you see a network interface that was created by a service role like AWSGlueServiceRole-redshift, and you've confirmed there are no active jobs or integrations, but it still can't be deleted, it's often because the ENI (Elastic Network Interface) is still managed or referenced internally by the service, even if it looks inactive.

Please follow the suggested troubleshooting steps to resolve this:

  1. Double-check service dependencies
    Ensure that no Glue connections, crawlers, or DevEndpoints are still configured with VPC access. These can silently hold onto ENIs even if they’re not actively running. Also, in Redshift, check for VPC peering, Data Sharing, or Spectrum features that might have set up persistent networking.

  2. Allow some time
    As another community member mentioned, managed ENIs (like those created by Lambda or Glue) often stays for 45–60 minutes after the last usage due to AWS internal cleanup processes. If you’ve just deleted a resource (like a Glue job or connection), wait a bit before retrying deletion.

  3. Check IAM permissions
    You need ec2:DeleteNetworkInterface and sometimes ec2:DetachNetworkInterface if it's still attached. Also ensure your identity has access to manage service-linked roles, which Glue might use.

  4. Use the AWS CLI or SDK for forceful checks
    Sometimes the console doesn’t show the full picture. Try: aws ec2 describe-network-interfaces --network-interface-ids eni-<your-data> aws ec2 delete-network-interface --network-interface-id eni-<your-data>

  5. If the interface is truly orphaned and no longer in use, but still won’t delete, open a support case with AWS. Orphaned ENIs from managed services do happen occasionally and AWS Support can remove them safely on your behalf.

Hope this helps. Let me know if you need help further. Honey Jakundiya

answered 10 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.

Guidelines for Answering Questions