BUCKET_ENDPOINT_URL
must contain region otherwise URL signing process fails
#293
Labels
bug
Something isn't working
Describe the bug
I currently set my
BUCKET_ENDPOINT_URL
environment variable like this:https://BUCKET_NAME.s3.amazonaws.com/
Notice that I omit the region name. This is fine when uploading images but the URL signing process becomes broken.
To Reproduce
Steps to reproduce the behavior:
BUCKET_ENDPOINT_URL
to not have regionError parsing the X-Amz-Credential parameter; the region 'amazonaws' is wrong; expecting 'us-east-1'
The following is the code that initializes boto client with incorrect region, leading to broken signing.
runpod-python/runpod/serverless/utils/rp_upload.py
Lines 66 to 86 in bd68176
The error comes from this function that extracts region from URL incorrectly by thinking that
amazonaws
is the region.runpod-python/runpod/serverless/utils/rp_upload.py
Lines 27 to 40 in bd68176
Expected behavior
URL signing process should work even when there is no region specified in
BUCKET_ENDPOINT_URL
.I think that you should not try to set the value of the region when initializing boto client when there's no region from the URL.
Screenshots
The text was updated successfully, but these errors were encountered: