In AWS, i have network interfaces, which i am not able to delete, because they are supposedly in use. I have tried detaching them by the force option, but that deid not work.
How am i able to identify the object the network interface uses?
In AWS, i have network interfaces, which i am not able to delete, because they are supposedly in use. I have tried detaching them by the force option, but that deid not work.
How am i able to identify the object the network interface uses?
The best way to find the resource which a network interface is attached to is checking the 'Description' field of the ENI.
Depending on the resource type this Description field could change. Some examples I get from my environment are:
So checking the value of this field you can identify on most case the resource which use that ENI.
If you created the network interface in the last 90 days, you can use the CloudTrail console: switch to the Event History tab, select "Resource name" as the lookup type, and the ENI ID as the resource.
This will still leave you with some detective work. For example, I have one ENI with the description "VPC Endpoint Interface vpce-0f6a4XXXXXXXXXXXX", which isn't very helpful.
Looking at the CloudTrail event, I can see that the sourceIPAddress is "redshift.amazonaws.com", and that it was invoked with the assumed role "AWSServiceRoleForRedshift". So I can infer that it was done behind the scenes, to support Redshift.
I can go back to the event history, select "Resource type" from the dropdown, and use "AWS::Redshift::Cluster" as the resource type. Matching the timestamps between the CreateNetworkInterface event and the CreateCluster event, I can infer that the network interface belongs to my Redshift Serverless cluster.