From 9ba30017484afce4792a6b58a6f3ae2185058472 Mon Sep 17 00:00:00 2001 From: Alex Toker Date: Wed, 17 Sep 2025 12:02:08 +0000 Subject: [PATCH] Add AWS_ENDPOINT_URL_S3 in addition to S3_ENDPOINT_URL --- functions/src/open_archive/open_archive.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/functions/src/open_archive/open_archive.py b/functions/src/open_archive/open_archive.py index da9eb6e30..19d3c757b 100644 --- a/functions/src/open_archive/open_archive.py +++ b/functions/src/open_archive/open_archive.py @@ -120,8 +120,13 @@ def _extract_zip_file(archive_url, target_path: str = None, subdir: str = "conte def _init_boto3_client(): import boto3 - if os.environ.get('S3_ENDPOINT_URL'): - client = boto3.client('s3', endpoint_url=os.environ.get('S3_ENDPOINT_URL')) + + # Backward compatibility: Support both S3_ENDPOINT_URL (deprecated) and AWS_ENDPOINT_URL_S3 + # TODO: Remove this in 1.12.0 + endpoint_url = os.environ.get('AWS_ENDPOINT_URL_S3') or os.environ.get('S3_ENDPOINT_URL') + + if endpoint_url: + client = boto3.client('s3', endpoint_url=endpoint_url) else: client = boto3.client('s3') return client \ No newline at end of file