By using AWS re:Post, you agree to the AWS re:Post Terms of Use

Amazon Workspaces-created VPC, Directory and Network Interfaces cannot be deleted after deleting workspace instance,

0

In testing Amazon Workspaces using the automated wizard, I discovered it would not meet my needs and deleted the instance. The AD, Subnets, and VPC created for the Workspace now cannot be deleted. Most errors point to the two network interfaces that cannot be detached or deleted, due to the interface being in-use.

[Update from a comment below]: The entire workspace has been deleted, so there are no virtual desktops. I have deleted all EC2 instances, Volumes, Elastic IPs, Key Pairs in the region. There are no public IPs assigned to either of the stuck Network Interfaces. There are no NAT gateways or endpoints, nor any other gateways in the region. The interrelated undeletable things appear to be: the VPC, the AD, two Subnets, a Route Table, and a DHCP option set.

Clarifying repost of now-closed https://repost.aws/questions/QUkrjhMOWPTBWeBTATVtAXxg/unble-to-remove-an-instanceless-vpc-due-to-unremoveable-network-interfaces

4 Answers
1
Accepted Answer

Hello Aja,

  1. After the Workspaces are deleted, you need to deregister the directory with the Workspaces service.
  2. Then delete the directory itself. The 2 network interface that you are referring to, are attached to the 2 directory instances created in AWS service account (not customer account). Refer to What gets created documentation for more details.
  3. If you want to delete the VPC as well follow the documentation.

Please mark the answer as accepted if it helps you resolve the issue.

AWS
answered a year ago
profile picture
EXPERT
reviewed 6 months ago
profile picture
EXPERT
reviewed 9 months ago
  • It is possible to deregister the directory, but then attempting to delete it generated the error: "Cannot delete directory because it still has authorized applications. Additional directory details can be viewed at the Directory Service console". Tunnelling into the Directory Service console revealed an Application Management tab I had not noticed before. Inside that I found the "AWS Apps and Services" pane that included a whole bunch of disabled apps and services, and one lone enabled service: "Amazon Workdocs". I suspect that is the issue, but can see no way to disable the application (visiting the WorkDocs console just offers me the option of signing up).

  • Accepting this answer as it gave me the clue to solving. Solution detailed below.

1

Have you deleted the AD as this comes with 2 instances by default which could be where your network interfaces are?

Have you deleted all the virtual desktops as these take up interfaces and the workspace setup too?

Following all that, NAT gateways take up ips also and any vpc endpoints you may have setup.

profile picture
EXPERT
answered a year ago
profile pictureAWS
EXPERT
reviewed a year ago
  • If this answer solved your issue, please be sure to mark the answer as accepted. Thanks!

  • As noted in the description, the problem is that I cannot delete the AD. I have only ever seen the one. The entire workspace has been deleted, so there are no virtual desktops. I have deleted all EC2 instances, Volumes, Elastic IPs, Key Pairs in the region. There are no public IPs assigned to either of the stuck Network Interfaces. There are no NAT gateways or endpoints, nor any other gateways in the region. The interrelated undeletable things appear to be: the VPC, the AD, two Subnets, a Route Table, and a DHCP option set.

  • Do you receieve an error messsage when removing the AD configuration? Do you have the appropiate access to do so?

0

OK. Solution is: (1) Re-register directory. (Thankfully, you have some undeletable subnets lying around.) (2) Check if workdocs is enabled on the directory service console (not the directory section of workspaces). If it is, go to workdocs and delete the site. (3) Now, return to workspaces and de-register the directory. That should disable any other applications (not sure why Workdocs was an outlier) (4) Delete the directory (it works this time!) It might take a while to complete. (5) Go back to EC2 and confirm the undeleteable Network Interfaces have gone away. (6) Delete the remainder of the cruft.

answered a year ago
0

I have a similar issue and uncertain if the Network Interface was created by Workdocs or SageMaker. In either case, Workdays has been completely deleted, so I cannot reregister. SageMaker is also completely deleted, so I cannot make modifications there. As a result, I keep running around in circles from Network Interfaces, to VPC, to subnets and nothing can be deleted in the ultimate circular reference. There is no way to force the issue and I cannot clean up security groups or other resources. Is there a human being that can help with these issues?

answered a year 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