Scripted Removal of AWS Control Tower Managed Accounts

0

I can use the AWS Control Tower account factory API to provision new managed AWS accounts. I also need to be able to delete AWS accounts with code when they are no longer required. Is there a solution for bulk deleting Control Tower managed AWS accounts without having to log in to each account as the root user and close it?

1개 답변
1
수락된 답변

Yes you can do this. If you do not unmanage the account before you close it, you must delete the account's provisioned product in AWS Service Catalog after those 90 days are finished.

From https://docs.aws.amazon.com/controltower/latest/userguide/delete-account.html

You can close your AWS Control Tower member accounts from your organization’s management account without a requirement to sign in to each member account individually with root credentials, by means of AWS Organizations. You cannot close your management account in this way, however.

When you call the AWS Organizations CloseAccount API, or close an account in the AWS Organizations console, the member account is isolated for 90 days, as any AWS account would be. The account shows a Suspended status in AWS Control Tower and AWS Organizations. If you attempt to work with the account during that 90 days, AWS Control Tower gives an error message.

Please see the CloseAccount API Reference here

https://docs.aws.amazon.com/organizations/latest/APIReference/API_CloseAccount.html

profile pictureAWS
전문가
Matt-B
답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠