How to Enable Region Programmatically

1

We are looking to enable an AWS region programmatically using either boto3 or terraform.

3개 답변
1

Actually this is now possible for standalone accounts and organization member accounts [1].
Please keep in mind that it might take several hours until the region is useable. To check its status execute the get_region_opt_status [2] after your enable_region request [3].

References:
[1] https://docs.aws.amazon.com/accounts/latest/reference/manage-acct-regions.html
[2] https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/account.html#Account.Client.get_region_opt_status
[3] https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/account.html#Account.Client.enable_region

답변함 일 년 전
0

Hello Dyasic,

I understand that you are trying to enable an AWS Region programmatically using either boto3 or terraform. However, an AWS Region can only be enabled using the AWS Management Console, see reference [1].

Regions introduced before March 20, 2019 are enabled by default. You can begin creating and managing resources in these Regions immediately. You cannot enable or disable a Region that is enabled by default, see reference [2] for more information regarding this. 

The following regions are disabled by default:

  • Africa (Cape Town)
  • Asia Pacific (Hong kong)
  • Asia Pacific (Jakarta)
  • Europe (Milan)
  • Middle East (Bahrain) All other regions are enabled by default.

However, to enable a Region that is disabled by default using the AWS Management Console, you must have permission to enable Regions, see reference [3].

References:

[1] https://docs.aws.amazon.com/accounts/latest/reference/manage-acct-regions.html

[2] https://docs.aws.amazon.com/general/latest/gr/rande-manage.html

[3] https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_examples_aws-enable-disable-regions.html

답변함 2년 전
0

If you look at reference [1], it says that it is not available via CLI or SDK. Please contact your account team to present your use case, and they will work with the appropriate team to get it on the backlog for implementation.

profile pictureAWS
답변함 2년 전

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

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

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

관련 콘텐츠