AWS 控制塔托管账户的自动化脚本删除账户

0

【以下的问题经过翻译处理】 我可以使用AWS Control Tower账户工厂API来创建新的托管的AWS账户。当这些账户不再需要时,我也需要能够使用代码来删除AWS账户。是否有一种批量删除Control Tower托管的AWS账户的解决方案,而不用作为根用户登录每个账户并关闭它?

1 Answer
0

【以下的回答经过翻译处理】 您可以这样做。如果在关闭帐户之前未取消管理该帐户,您必须在 AWS 服务目录中删除帐户的预置产品,在这 90 天结束后才能关闭帐户。您可以通过 AWS Organizations 从组织的管理帐户关闭 AWS Control Tower 成员帐户,而无需使用根凭证逐个登录每个成员帐户。但是,您不能以此方式关闭管理帐户。当您调用 AWS Organizations CloseAccount API 或在 AWS Organizations 控制台中关闭帐户时,成员帐户被隔离 90 天,就像任何 AWS 帐户一样。在 AWS Control Tower 和 AWS Organizations 中,该帐户显示“暂停”状态。如果您在那 90 天内尝试使用该帐户,AWS Control Tower 将显示错误消息。请参阅此处的 CloseAccount API 参考:https://docs.aws.amazon.com/organizations/latest/APIReference/API_CloseAccount.html。

profile picture
EXPERT
answered 5 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