Skip to content

Can't remove account from Organization that created by Terrraform

0

I created a member account in my AWS Organization using Terraform. However, I can't log into that account, nor can I reset its password (using 'Forgot Password'), so I'm unable to remove it from the organization. What can I do?

2 Answers
0

Hello.

If you want to close an AWS Organizations member account, you can do so by following the steps in the following document.
You can close it by performing the operation from the AWS Organizations management account.
https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_close.html

By the way, setting up IAM Identity Center should allow you to sign in to member accounts.
https://docs.aws.amazon.com/singlesignon/latest/userguide/identity-center-and-orgs.html

EXPERT

answered a month ago

EXPERT

reviewed a month ago

  • I want to delete my organization. However, to do so, I must first remove all member accounts. The problem is, I can no longer manage these accounts because I closed them, and the closure process takes 90 days. Also, the accounts haven't been set up with billing yet, so I cannot remove them from the organization as standalone accounts. Does this mean I can only delete the organization after the 90-day period is over?

  • Yes, if your account has already been closed, you will need to wait 90 days until it is completely deleted. Please wait 90 days for the member account to be completely deleted before deleting AWS Organizations. In your case, I think that's the only option.

  • Thanks for your support. What if I want to reopen that account? Can I?

  • You can reactivate your AWS account within 90 days. As stated in the following document, you will need to contact AWS support, so please try contacting them. Inquiries regarding "Account and billing" are free of charge. https://repost.aws/knowledge-center/reopen-aws-account https://docs.aws.amazon.com/accounts/latest/reference/manage-acct-closing.html

    Your account will permanently close in 90 days, after which you will not be able to reopen your account and AWS will delete the content remaining in your account. To reopen your account before it is permanently closed, (1) you must contact AWS Support as soon as possible, and (2) we must receive full payment of any outstanding balance, including providing required information as specified on the invoice, within 30 days from the date of account closure.

-1

When you create a member account through AWS Organizations (including via Terraform), the account may not have all the information required to operate as a standalone account, which can prevent removal. Here are steps you can take to resolve this issue:

To gain access to the member account:

  1. Use the OrganizationAccountAccessRole: When an account is created through Organizations, an IAM role called "OrganizationAccountAccessRole" is automatically created with administrative permissions. You can assume this role from the management account to gain access to the member account.

  2. Assume the administrator role: From your management account, use the IAM console to assume the OrganizationAccountAccessRole for the member account. This will give you administrative access without needing the root password.

  3. Change the email address: If you don't have access to the email address associated with the member account, you can change it through the Organizations console to an email address you can access. Then you can reset the password.

Before removing the account, ensure it meets these requirements:

  • The account must have a valid payment method
  • The account must have a verified phone number
  • The account must accept the AWS Customer Agreement
  • The account must choose a support plan
  • The account must provide and verify required contact information

If you encounter a "ConstraintViolationException" error when trying to remove the account, it typically means these prerequisites aren't met. Verify the payment method and phone number are properly configured.

If you continue to experience issues after completing these steps, particularly if there's a billing-related problem, you may need to contact AWS Support through the AWS Support Center at https://console.aws.amazon.com/support/.
Sources
Troubleshooting AWS Organizations - AWS Organizations
Remove a member account from an AWS Organization | AWS re:Post
Manage AWS organization accounts | AWS re:Post

answered a month 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.