-
Notifications
You must be signed in to change notification settings - Fork 249
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
Uploading fails when metadata is added in S3 upload presigned url #423
Comments
Seems like the presigner doesn't properly include metadata in the signature. Thanks for the bug report, we'll get this fixed! |
if you don't mind, is it possible for me to contribute to this issue? If I do, do you have any advice on which part I should check? (I'm focusing on https://github.com/awslabs/smithy-rs/tree/main/aws/rust-runtime/aws-sigv4 for now) The investigation seems to have started, so if the fix has already started, I will wait. |
it definitely is! Yeah it's probably a bug in aws-sigv4. I would probably generate the same URL with the AWS CLI, then compare and attempt to isolate the bug. We haven't started investigating or fix yet, but @Velfi was planning on digging in this week if you would like to collaborate |
OK, if the problem is one that even I can create a PR to fix after investigation, please call me again! |
Hey @higumachan, I looked into this and I believe the problem is that you weren't attaching some headers when making your request with Could you try updating that section of code to add the headers and let me know if that fixes things for you? let resp = client
.put(uri)
// This will ensure that all headers on the presigned request get transferred over
.headers(presigned_request.headers().clone())
.header("content-type", "application/octet-stream")
.body("test")
.send()
.await?; To hopefully help future people, I made some changes to our presigning example in this PR that demonstrates how to convert a |
Thank you a lot! I was able to get it to work with the code here. |
I can close it. Don't hesitate to let us know if you run into any more issues. Also, if you're still interested in contributing, we have a few "good first issue"s in the |
|
What is the problem?
If you publish an upload presigned url with metadata like the following code, you will get an error when you try to upload data to that url.
Version
Platform
Darwin MacBook-Pro-3.local 20.3.0 Darwin Kernel Version 20.3.0: Thu Jan 21 00:07:06 PST 2021; root:xnu-7195.81.3~1/RELEASE_X86_64 x86_64
AWS Services
No response
Description
Logs
No response
The text was updated successfully, but these errors were encountered: