MWAA Launched in China regions BJS and ZHY in mid May 2023. But this helper script doesn't work properly because if the region is specified to china, we will get Invalid Region exception. The issue was that china regions are not returned in the call to get_available_regions. From the implementation of that function, we can see that partition_name='aws' is the default value, and we need to specify a partition for China aws-cn. We can use get_partition_for_region to get the correct partition for each region input, and then this script can work normally.
Some more changes were made to account for the domain name difference in the china partition.
Tested on a fresh environment in BJS region.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Description of changes:
MWAA Launched in China regions BJS and ZHY in mid May 2023. But this helper script doesn't work properly because if the region is specified to china, we will get
Invalid Region exception
. The issue was that china regions are not returned in the call toget_available_regions
. From the implementation of that function, we can see thatpartition_name='aws'
is the default value, and we need to specify a partition for Chinaaws-cn
. We can useget_partition_for_region
to get the correct partition for each region input, and then this script can work normally.Some more changes were made to account for the domain name difference in the china partition.
Tested on a fresh environment in BJS region.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.