question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[S3] Bucket name containing slash character fails with any operation

See original GitHub issue

Describe the bug

After migrating SDKv1 to SDKv2, accessing any bucket resource with any operation: create, upload, list, delete, etc. containing slash character “/” in bucket name fails throwing the following exception: The request signature we calculated does not match the signature you provided. Check your key and signing method.

Example: Uploading objects to the root of the bucket works, but when we try to save it to a subfolder it fails: Uploading object to “my-bucket” OK Uploading object to “my-bucket/subfolder” FAILS - Note that slash is present!

Expected Behavior

Bucket names with subfolders should work.

Current Behavior

software.amazon.awssdk.services.s3.model.S3Exception: The request signature we calculated does not match the signature you provided. Check your key and signing method.

Reproduction Steps

String bucketName = "my-bucket/subfolder", objectName = "123.jpg";
s3TransferManager.upload(builder -> builder.requestBody(AsyncRequestBody.fromBytes(objectBytes))
.putObjectRequest(request -> request.bucket(bucketName).key(objectName)));

Possible Solution

No response

Additional Information/Context

No response

AWS Java SDK version used

2.17.228

JDK version used

1.8.0_321

Operating System and version

macOS Monterey v12.4

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:8

github_iconTop GitHub Comments

1reaction
yasminetalbycommented, Jul 19, 2022

Hello @jereztech ,

Update: This feature request is in our backlog. I will be updating your submission to a feature request

Thank you for your submission. Best,

Yasmine

0reactions
yasminetalbycommented, Jul 20, 2022

Hello @maciejwalkowiak ,

Unfortunately, this board does not reflect the current team backlog. We are in the process of updating the team backlog display on GitHub. If this is a feature you would like to see implemented you can showcase your interest by adding a thumbs up emoji 👍🏼 on the feature request.

Best regards,

Yasmine

Read more comments on GitHub >

github_iconTop Results From Across the Web

Object name contains unsupported characters when using ...
Expected Behavior. Handle double forward slashes in the URI, i.e. bucket name ending in / is then appended by the object name starting...
Read more >
Upload files with name contains trailing slash to AWS S3 bucket
I'm trying to upload some files to my bucket on S3 through boto3 on Python. These files name are websites addresses (for example...
Read more >
Creating object key names - Amazon Simple Storage Service
Object keys (object key names) uniquely identify Amazon S3 objects. ... The object key (or key name) uniquely identifies the object in an...
Read more >
Special characters in the AWS S3 folder name - TechDocs
If the folder name in S3 bucket contains a special character backslash (\) or double quotation mark ("), it needs special handling when...
Read more >
Invalid Bucket name when creating s3 bucket with AWS SDK
The bucket name cannot contain underscores, end with a dash, have consecutive periods, or use dashes adjacent to periods. The bucket name cannot ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found