Skip to content

Cannot delete directory

0

I'm trying to delete a directory, but I get this error in the console:

Delete directory "corp.amazonworkspaces.com" ?

You are trying to delete the directory "corp.amazonworkspaces.com (d-..........)". This directory still has associated resources attached to it and can't be deleted until the following steps are taken: An error occurred Your request has a problem. Please see the following details. Cannot delete the directory because it still has authorized applications. : RequestId: 752f33f0-1e94-45d8-bc94-..............

Problem is, I cannot find anything associated with this directory, any ideas? (I checked workspaces, there are none)

asked 10 months ago173 views
1 Answer
0

It appears you're encountering a common issue when trying to delete an AWS Directory Service directory that was previously associated with Amazon WorkSpaces. Even though you've checked and found no active WorkSpaces, the system still believes there are associated resources or authorized applications linked to the directory.

Here are some steps you can take to resolve this issue:

  1. Double-check for any remaining WorkSpaces: Use the AWS CLI to confirm there are no WorkSpaces associated with the directory: aws workspaces describe-workspaces

  2. Attempt to deregister the directory from WorkSpaces: Try using the AWS CLI to deregister the directory: aws workspaces deregister-workspace-directory --directory-id d-xxxxxxxxx

  3. Check for other authorized applications: The error message suggests there might be other authorized applications still linked to the directory. Review any other AWS services that might be using this directory, such as Amazon Connect, Amazon Chime, or AWS IAM Identity Center.

  4. Wait and retry: Sometimes, the process of removing application assignments can take longer than expected. After ensuring you've removed all assignments, wait for 30 to 60 minutes before attempting to delete the directory again.

  5. Contact AWS Support: If none of the above steps resolve the issue, it's possible that there's a backend problem preventing the directory from being deleted. In this case, the best course of action is to open a support case with AWS. If you don't have a support contract, you can submit it as a Billing request.

Remember, when dealing with directory services, it's crucial to ensure all associated resources are properly deregistered or removed before attempting to delete the directory. If the issue persists, AWS Support should be able to assist you in resolving any backend issues that may be preventing the deletion.
Sources
How to delete a directory service that wont be deleted | AWS re:Post
Delete a directory for WorkSpaces Personal - Amazon WorkSpaces

answered 10 months ago
EXPERT
reviewed 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.