-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Error when try to upload to presigned URL generated with parameter ACL #1661
Comments
Thanks for reaching out to us @slapec93 It looks like the issue you're running into is how the AWS SDK for Ruby marshals the I'll look into why there is this difference. As a workaround you can use the |
Thanks for the update. I've investigated this issue and it looks like the URL that is being generated by the AWS SDK for Ruby is actually not restricting the presigned URL to the parameters that is being specified in the SDK's a input parameters. Specifically the In addition for ACL, if the Here is a reference to where this issue was fixed in the AWS SDK for Ruby v2.1.31 and related Github issue, aws/aws-sdk-ruby#874. I think nearly all of the S3 header values need to be preserved as headers for presigned URLs. |
Got it, thank you @jasdel ! :) |
Let us know if you run into any addition issues with the SDK or have feedback. |
I searched many solution, they never mention "x-amz-acl" should be putted in header. Frustrated for almost a half day util see your answer which writed " if the x-amz-acl field is not in the header the ACL canned policy is ignored." ): |
Version of AWS SDK for Go?
v1.12.7, but I tried to update to the latest one and the issue still exists
Version of Go (
go version
)?go1.9 darwin/amd64
What issue did you see?
Just like in the issue #1252, I get the error
The request signature we calculated does not match the signature you provided. Check your key and signing method.
when I try to upload a file to AWS with presigned URL.Steps to reproduce
I create a new S3 object and then I create a request with the method named
PutObjectRequest
, just like this:After this call the Presign method of the request with the expire time, I don't get any error, bbut when I try to upload a file with a
curl
command, it retrieves the error mentioned above. Mycurl
call looks like this:In another project, which is a Rails one, we use the AWS gem, which works fine, so I compared the two generated presigned URL and found the differences below:
When I remove the ACL parameter, the upload works fine.
The use of PresignRequest method isn't an options, because I need one compact URL.
Thanks in advance 🙂
The text was updated successfully, but these errors were encountered: