Closed DavidSouther closed 1 year ago
For the code in Reproduction Steps
above, it is passing a return value from CreateBucketOutput::location
to PutObject::bucket
that causes a panic, because the reassigned variable bucket
now contains a forward /
. If we comment out
let bucket = create_bucket
.location()
.expect("Failed to get created bucket");
from the repro step, it no longer panics.
When a user already has a bucket name in the form of a string literal, i.e. let bucket = format!("test-bucket-{}", uuid::Uuid::new_v4());
in the repro step, it feels more natural that the user keeps using that literal throughout the code rather than going out of his/her way to obtain a return value out of CreateBucketOutput::location
and using it instead.
That said, as the repro step demonstrates, users can certainly run into this issue, and when it happens, it is not so straightforward for them to figure out what they did wrong. From an ergonomics perspective, it's worth addressing.
In retrospect this is (as typical) S3's fault. What even is the purpose of the Location response field in this API?
I think the signature mismatch issue was resolved a while back, and we forgot to close this issue. Feel free to re-open if you disagree.
Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.
Describe the bug
In this glue example, I am uploading a .py script for the crawler to run.
https://github.com/DavidSouther/aws-doc-sdk-examples/blob/4815350f9994b84e552d51672dd5dc544e53ee5c/rust_dev_preview/glue/src/bin/scenario.rs#L256-L266
Expected Behavior
PutObject to succeed with no errors.
Current Behavior
PutObject is erroring with signature mismatches.
Reproduction Steps
src/main.rs (or src/bin/ssccee.rs)
Possible Solution
No response
Additional Information/Context
No response
Version
Environment details (OS name and version, etc.)
macOS Monterey Version 12.6.1 Apple M1 Pro
Logs
No response