From ea5f68eb18107e845a43b7831211d92a6fbf0f95 Mon Sep 17 00:00:00 2001 From: Liam Beckman Date: Thu, 29 Feb 2024 12:59:39 -0800 Subject: [PATCH] Update Boto Manager --- fence/resources/aws/boto_manager.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/fence/resources/aws/boto_manager.py b/fence/resources/aws/boto_manager.py index 7493596e9..e0744554a 100644 --- a/fence/resources/aws/boto_manager.py +++ b/fence/resources/aws/boto_manager.py @@ -27,14 +27,12 @@ def __init__(self, config, buckets, logger): self.iam = None def create_s3_clients(self, config, buckets): - s3_clients = {'default': self.s3_client} - + s3_clients = {} for bucket in buckets: cred_name = buckets[bucket]['cred'] creds = {} if cred_name != '*': creds = config[cred_name] - if 'endpoint_url' in buckets[bucket]: endpoint_url = buckets[bucket]['endpoint_url'] s3_clients[bucket] = client('s3', **creds, endpoint_url=endpoint_url) @@ -44,7 +42,7 @@ def create_s3_clients(self, config, buckets): def get_s3_client(self, bucket): if self.s3_clients.get(bucket) is None: - return self.s3_clients['default'] + return self.s3_clients[0] return self.s3_clients[bucket] def delete_data_file(self, bucket, prefix):