From bcd99e0cd7acbb1c1800f59a581f8abd68a551b2 Mon Sep 17 00:00:00 2001 From: Anton Kukushkin Date: Tue, 29 Oct 2024 16:39:38 +0000 Subject: [PATCH 1/2] fix session manager toolchain region --- seedfarmer/services/session_manager.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/seedfarmer/services/session_manager.py b/seedfarmer/services/session_manager.py index a256881..f90b0dc 100644 --- a/seedfarmer/services/session_manager.py +++ b/seedfarmer/services/session_manager.py @@ -140,6 +140,7 @@ def get_deployment_session(self, account_id: str, region_name: str) -> Session: session_key = f"{account_id}-{region_name}" project_name = self.config["project_name"] qualifier = self.config.get("qualifier") if self.config.get("qualifier") else None + toolchain_region = self.config.get("toolchain_region") if not self.created: raise seedfarmer.errors.InvalidConfigurationError("The SessionManager object was never properly created...") if session_key not in self.sessions.keys(): @@ -152,6 +153,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=toolchain_region if toolchain_region else region_name, ) partition = sts_toolchain_client.get_caller_identity()["Arn"].split(":")[1] deployment_role_arn = get_deployment_role_arn( From 5e31b4e25e303e3d60393aec8191f7aeb0271128 Mon Sep 17 00:00:00 2001 From: Anton Kukushkin Date: Tue, 29 Oct 2024 21:30:44 +0000 Subject: [PATCH 2/2] changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b9ab03d..6ecb6f6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ This project adheres to [Semantic Versioning](http://semver.org/) and [Keep a Ch - Added ability to disable env replacement in module parameters - Updating bootstrap docs with minimum permissions - Update manifest example module versions +- Update session manager to pass toolchain role region to sts ### Fixes