sparse-park-92566
08/05/2024, 12:06 PMpants.backend.url_handlers.s3
?
Sample code being :
file(
name="test-download",
source=http_source(url="<s3://example-bucket/bucket-data.gz>",
sha256="20ee0c788011355604f31e41b2ec87d718da588d7404b9bbb50",
len=740199)
)
Currently it fails with a 400 error because Requests specifying Server Side Encryption with AWS KMS managed keys require AWS Signature Version 4.
whereas we dont use SigV4Auth currently in pants code
Now when I tried to use SigV4Auth (ie AWS Signature Version 4) method as available in botocore here , it is still failing with 403 errors.
For debugging I printed all the headers passed for the request. And tried to make the same request using python like following
resp = requests.get(url = url, headers = headers)
The weird thing is the python request gets a 200 response while the equivalent pants one gets a 403 response.
Any help is much appreciated, as always. Thank you!