Skip to content

Commit 645d2ad

Browse files
committed
hotfix
1 parent dfaa27a commit 645d2ad

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

etl_server/files/controllers.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,20 @@
1212
class Controllers():
1313

1414
def __init__(self, bucket_name, endpoint_url, aws_access_key_id, aws_secret_access_key, aws_region):
15+
# GCP Cloud Storage compatibility: disable boto3 1.36.0+ checksum validation
16+
# See: https://www.beginswithdata.com/2025/05/14/aws-s3-tools-with-gcs/
17+
os.environ['AWS_REQUEST_CHECKSUM_CALCULATION'] = 'when_required'
18+
os.environ['AWS_RESPONSE_CHECKSUM_VALIDATION'] = 'when_required'
19+
1520
kw = dict(
1621
endpoint_url=endpoint_url,
1722
aws_access_key_id=aws_access_key_id,
1823
aws_secret_access_key=aws_secret_access_key,
1924
region_name=aws_region,
20-
config=Config(signature_version='s3v4', s3={'addressing_style': 'path'})
25+
config=Config(
26+
signature_version='s3v4',
27+
s3={'addressing_style': 'path'}
28+
)
2129
)
2230
self.s3client = boto3.client('s3', **kw)
2331
self.s3 = boto3.resource('s3', **kw)

0 commit comments

Comments
 (0)