From bcd99e0cd7acbb1c1800f59a581f8abd68a551b2 Mon Sep 17 00:00:00 2001 From: Anton Kukushkin Date: Tue, 29 Oct 2024 16:39:38 +0000 Subject: [PATCH] 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(