Skip to content

Commit f54beda

Browse files
committed
Remove unsigned client
1 parent 219583b commit f54beda

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

src/aind_ephys_portal/panel/ephys_portal.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
from aind_ephys_portal.panel.utils import format_link, OUTER_STYLE, EPHYSGUI_LINK_PREFIX
1313

1414
s3_client = boto3.client("s3")
15-
s3_unsigned_client = boto3.client('s3', config=Config(signature_version=UNSIGNED))
1615

1716

1817
class EphysPortal:
@@ -160,13 +159,8 @@ def get_raw_asset_location(self, asset_location):
160159
try:
161160
response = s3_client.list_objects_v2(Bucket=bucket_name, Prefix=prefix, MaxKeys=1)
162161
except Exception as e:
163-
# Try with unsigned client
164-
print(f"Error listing objects from {bucket_name}/{prefix}: {e}\nTrying with unsigned client...")
165-
try:
166-
response = s3_unsigned_client.list_objects_v2(Bucket=bucket_name, Prefix=prefix, MaxKeys=1)
167-
except Exception as e:
168-
print(f"Error listing objects with unsigned client from {bucket_name}/{prefix}: {e}")
169-
continue
162+
print(f"Error listing objects with unsigned client from {bucket_name}/{prefix}: {e}")
163+
continue
170164
if "Contents" in response:
171165
raw_asset_location = f"s3://{bucket_name}/{prefix}"
172166
break

0 commit comments

Comments
 (0)