Support of AWS profiles

This commit is contained in:
Yaroslava Lukoyanova 2023-11-24 16:32:26 +03:00 committed by ylukoyan
parent c17f0f6173
commit 47414eb866
3 changed files with 55 additions and 54 deletions

View file

@ -48,9 +48,9 @@ class Boto3ClientWrapper(S3ClientWrapper):
@reporter.step_deco("Configure S3 client (boto3)")
@report_error
def __init__(self, access_key_id: str, secret_access_key: str, s3gate_endpoint: str) -> None:
def __init__(self, access_key_id: str, secret_access_key: str, s3gate_endpoint: str, profile: str='default') -> None:
self.boto3_client: S3Client = None
self.session = boto3.Session()
self.session = boto3.Session(profile_name=profile)
self.config = Config(
retries={
"max_attempts": MAX_REQUEST_ATTEMPTS,