Unble to remove an instanceless VPC due to unremoveable network interfaces.

0

**Update: Question moved and clarified. See https://repost.aws/questions/QUytbFqnC8TY6RQhedsRC1DQ/amazon-workspaces-created-vpc-directory-and-network-interfaces-cannot-be-deleted-after-deleting-workspace-instance

Network interfaces cannot be detached due to "in use by another service"? No indication as to what service, and I've deleted everything I can find. "Forcing" detachment has no effect. Interfaces also cannot be deleted for the same reason. Cannot delete security groups for similar issues with undeletable network interfaces associated. Security group inbound and outbound rules have been deleted to the extent possible. Deletion of subnets also fails for the same reason. I have no Elastic IPs.

Update from above. It appears that the specific thing blocking the removal is a directory that was created automatically for Amazon Workspaces. I've since learned that Workspaces (created by the automatic wizard) created the directory in question. There are no longer any Workspace instances, but the directory claims "Cannot delete directory because it still has authorized applications. Additional directory details can be viewed at the Directory Service console." Visiting the Directory Service Console shows the directory, the option to delete is greyed out. Deregistering it does not release the resources (VPC, SG, subnets, network interfaces) associated.

3 Answers
1
Accepted Answer

Hi. Check the description field of target ENI from console. There will be hint what service is using target ENI.

if you want. to check from AWS CLI command is like this.

aws ec2 describe-network-interfaces --query "NetworkInterfaces[*].[NetworkInterfaceId,Description]" --output table
profile picture
EXPERT
answered 10 months ago
profile pictureAWS
EXPERT
iBehr
reviewed 10 months ago
  • Thanks. Unfortunately, that just gives me "AWS created network interface for directory d-*********", for both interfaces. referencing the directory I can't remove because of them.

  • This did point me in the direction of identifying it as a Workspaces-related issue, so marking as accepted. I'm opening a new question with a better description and keywords.

1

You can look for VPC dependencies as described in this document.
https://repost.aws/knowledge-center/troubleshoot-dependency-error-delete-vpc

If it is a network interface, the following procedure can be used to find it.

  1. Open the Amazon EC2 console.

  2. Select the AWS Region that the Amazon VPC is in.

  3. In the navigation pane, under Network Interfaces, search for the VPC ID of the Amazon VPC that you're deleting.

  4. Select the network interface and choose the Details tab.

  5. Review the Description to see which resources the network interface is attached to.

  6. Delete the associated resources. For example, you're deleting a Network Interface and the Requester ID is amazon-elb. Use the value in the Description field of the Elastic Network Interface to identify the load balancer. Then, navigate to the Load Balancer section of the Amazon EC2 console, locate the load balancer, and delete it. Note: If the network interface is a primary one, then it's deleted when you delete the instance.

profile picture
EXPERT
answered 10 months ago
profile picture
EXPERT
reviewed 10 months ago
0

Closing to open one with a better description of the core issue and more appropriate keywords. Thanks to all who helped.

aja
answered 10 months 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