-
Notifications
You must be signed in to change notification settings - Fork 910
Upload document to S3 using PreSigned URL using AWS JDK 2.x not working #3005
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Can you paste a generated URL in the comments? Please redact any sensitive information. Presigned URLs work with query params to send values that would be usually sent by http headers.
|
Hi @debora-ito , The suggestion you made helped, I'm now facing "Access Denied", although i have policies for the role being used by our microservice that allows all actions to our s3 bucket. Contacted AWS and they suggested that it could be a policy at organization level and we are investigating that now. Thank you |
Do you know if it is required to add additional parameter regarding encrypting to generate presigned url? Note: The bucket where we want to upload documents uses KMS encryption (custom managed key created by us). Thank you |
Yes, you need to add the parameters related to the server-side encryption you want to use. One way to know which params to include is to execute a working PutObjectRequest with the required encryption settings, enable the verbose wirelogs (see instructions here) and check which |
Amazon really need to get their documents right, so many people facing this issue. No where on their document i could find the solution to this |
Describe the issue
I'm trying to upload a document to S3 bucket using presigned url that was generated using JDK 1.8 / AWS Java SDK 2.17.108, but I'm having the error "The request signature we calculated does not match the signature you provided. Check your key and signing method."
Steps to Reproduce
Following is the piece of code I have to generate the presigned URL:
Note: I'm also using IAM user access keys in the S3Presigner.builder method.
Current behavior
I'm having the below errors:


AWS Java SDK version used
2.17.108
JDK version used
1.8
Operating System and version
N/A
The text was updated successfully, but these errors were encountered: