Fix region

This commit is contained in:
alesapin 2021-10-20 14:52:03 +03:00
parent d120d3720a
commit 6ea04b2ea6
2 changed files with 3 additions and 3 deletions

View File

@ -4,11 +4,11 @@ from github import Github
def get_parameter_from_ssm(name, decrypt=True, client=None): def get_parameter_from_ssm(name, decrypt=True, client=None):
if not client: if not client:
client = boto3.client('ssm') client = boto3.client('ssm', region_name='us-east-1')
return client.get_parameter(Name=name, WithDecryption=decrypt)['Parameter']['Value'] return client.get_parameter(Name=name, WithDecryption=decrypt)['Parameter']['Value']
def get_best_robot_token(token_prefix_env_name="github_robot_token_", total_tokens=4): def get_best_robot_token(token_prefix_env_name="github_robot_token_", total_tokens=4):
client = boto3.client('ssm') client = boto3.client('ssm', region_name='us-east-1')
tokens = {} tokens = {}
for i in range(1, total_tokens + 1): for i in range(1, total_tokens + 1):
token_name = token_prefix_env_name + str(i) token_name = token_prefix_env_name + str(i)

View File

@ -29,7 +29,7 @@ def _flatten_list(lst):
class S3Helper(object): class S3Helper(object):
def __init__(self, host): def __init__(self, host):
self.session = boto3.session.Session() self.session = boto3.session.Session(region_name='us-east-1')
self.client = self.session.client('s3', endpoint_url=host) self.client = self.session.client('s3', endpoint_url=host)
def _upload_file_to_s3(self, bucket_name, file_path, s3_path): def _upload_file_to_s3(self, bucket_name, file_path, s3_path):