-
|
Using aws-sdk 3.1.0 I have an issue generating a S3 presigned_url for an object encrypted using SSE-C : When I try to download though a presigned url request I get the following error : "There were headers present in the request which were not signed" The header not signed is "x-amz-server-side-encryption-customer-algorithm" Note : Uploading the object and downloading the object with the SDK works fine. Here is how I set the SSE headers for the presigned_url : I get this URL : Here is how I set the headers for the HTTP request : The full error is : I read the doc about header formating but I dont understand what I'm doing wrong... https://docs.amazonaws.cn/en_us/AmazonS3/latest/userguide/ServerSideEncryptionCustomerKeys.html Can anybody help ? Here is the full script to reproduce the issue : |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
|
Thanks for opening up a discussion. I think for your request, you do not need to send the |
Beta Was this translation helpful? Give feedback.
-
|
It works if I remove For info :
Thanks a lot for your help! |
Beta Was this translation helpful? Give feedback.
-
|
Hello! Reopening this discussion to make it searchable. |
Beta Was this translation helpful? Give feedback.
Thanks for opening up a discussion. I think for your request, you do not need to send the
x-amz-server-side-encryption-customer-*headers because they are already hoisted onto the URL (they are query parameters). They are not in theX-Amz-SignedHeadersquery param. Can you try your request without those headers? You can also try thepresigned_requestmethod instead - it returns a tuple of the URL and the headers to send with it. The URL from this method would have those headers signed but not hoisted.