diff --git a/CHANGELOG.md b/CHANGELOG.md index 79afc9a..36f693f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ This project adheres to [Semantic Versioning](http://semver.org/) and [Keep a Ch ### Fixes - Adds validation for trusted principal arns in `seedfarmer bootstrap toolchain` +- Add region to sts boto client if using aws-cn partition ## v4.0.4 (2024-07-19) diff --git a/seedfarmer/services/session_manager.py b/seedfarmer/services/session_manager.py index 6318790..91d8d10 100644 --- a/seedfarmer/services/session_manager.py +++ b/seedfarmer/services/session_manager.py @@ -149,6 +149,7 @@ def get_deployment_session(self, account_id: str, region_name: str) -> Session: aws_access_key_id=toolchain_role["Credentials"]["AccessKeyId"], aws_secret_access_key=toolchain_role["Credentials"]["SecretAccessKey"], aws_session_token=toolchain_role["Credentials"]["SessionToken"], + region_name=region_name if region_name in ["cn-north-1", "cn-northwest-1"] else None, ) partition = sts_toolchain_client.get_caller_identity().get("Arn").split(":")[1] deployment_role_arn = get_deployment_role_arn(