Wednesday, February 21, 2024
HomeSoftware Engineering Community interface is in use by one other service in AWS

[Solved] Community interface is in use by one other service in AWS


If in case you have tried to delete a Safety Group, or VPC, or varied different assets and also you get the dreaded Community interface is in use by one other service error, then you may resolve this by deleting the useful resource by the API.

How you can delete the Community Interface (ENI)

aws ec2 delete-network-interface --network-interface-id eni-xxxxx

Substitute the eni-xxxxx with the ENI id that you’re struggling to delete.

How you can discover what providers are utilizing the ENI

#!/bin/bash
vpc="vpc-xxxxxxxxxxxxx" 
aws ec2 describe-internet-gateways --filters 'Identify=attachment.vpc-id,Values='$vpc | grep InternetGatewayId
aws ec2 describe-subnets --filters 'Identify=vpc-id,Values='$vpc | grep SubnetId
aws ec2 describe-route-tables --filters 'Identify=vpc-id,Values='$vpc | grep RouteTableId
aws ec2 describe-network-acls --filters 'Identify=vpc-id,Values='$vpc | grep NetworkAclId
aws ec2 describe-vpc-peering-connections --filters 'Identify=requester-vpc-info.vpc-id,Values='$vpc | grep VpcPeeringConnectionId
aws ec2 describe-vpc-endpoints --filters 'Identify=vpc-id,Values='$vpc | grep VpcEndpointId
aws ec2 describe-nat-gateways --filter 'Identify=vpc-id,Values='$vpc | grep NatGatewayId
aws ec2 describe-security-groups --filters 'Identify=vpc-id,Values='$vpc | grep GroupId
aws ec2 describe-instances --filters 'Identify=vpc-id,Values='$vpc | grep InstanceId
aws ec2 describe-vpn-connections --filters 'Identify=vpc-id,Values='$vpc | grep VpnConnectionId
aws ec2 describe-vpn-gateways --filters 'Identify=attachment.vpc-id,Values='$vpc | grep VpnGatewayId
aws ec2 describe-network-interfaces --filters 'Identify=vpc-id,Values='$vpc | grep NetworkInterfaceId
RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments