Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
storage: allow configuration of storage region for cloud storage (PRO…
…JQUAY-3082) Boto3 behaves unexpectedly when the resource client is not set to use the correct region. Boto3 can't seem to correctly set the X-Amz-Credential header when generating presigned urls if the region name is not explicitly set, and will always fall back to us-east-1. To reproduce this: - Create a bucket in a different region from us-east-1 (e.g eu-north-1) - Create a boto3 client/resource without specifying the region - Generate a presigned url This seems to be a DNS issue with AWS that only happens shortly after a bucket has been created, and resolves itself eventually. Ref: - boto/boto3#2989 - https://stackoverflow.com/questions/56517156/s3-presigned-url-works-90-minutes-after-bucket-creation To workaround this, one can specify the bucket endpoint, either explicitly via endpoint_url, or by setting s3_region, which will be used to generate the bucket's virtual address.
- Loading branch information