Skip to content

Commit

Permalink
fix session manager toolchain region
Browse files Browse the repository at this point in the history
  • Loading branch information
kukushking committed Oct 29, 2024
1 parent 89631bc commit bcd99e0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions seedfarmer/services/session_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand All @@ -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(
Expand Down

0 comments on commit bcd99e0

Please sign in to comment.