Skip to content

Commit

Permalink
Address comment
Browse files Browse the repository at this point in the history
  • Loading branch information
tim1234ltp authored and AndiLi99 committed Oct 15, 2024
1 parent 95b1003 commit 263647b
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/util/s3_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@

def create_s3_client(s3_config: dict):
retries_config = s3_config.get("retries")
s3 = boto3.client(
"s3",
aws_access_key_id=s3_config["public_key"],
aws_secret_access_key=s3_config["secret_key"],
)
if retries_config:
config = Config(
retries=retries_config
Expand All @@ -19,4 +14,10 @@ def create_s3_client(s3_config: dict):
aws_secret_access_key=s3_config["secret_key"],
config=config
)
else:
s3 = boto3.client(
"s3",
aws_access_key_id=s3_config["public_key"],
aws_secret_access_key=s3_config["secret_key"],
)
return s3

0 comments on commit 263647b

Please sign in to comment.