-
Notifications
You must be signed in to change notification settings - Fork 920
Closed
Labels
bugThis issue is a bug.This issue is a bug.closed-for-stalenessp2This is a standard priority issueThis is a standard priority issue
Description
Describe the bug
When using the library against a Google Cloud Storage bucket, it fails uploading an object starting 2.30.0 (tested until 2.31.6),
Regression Issue
- Select this option if this issue appears to be a regression.
Expected Behavior
PutObject should work as it used to until 2.29.52.
Current Behavior
It throws
software.amazon.awssdk.services.s3.model.S3Exception: Invalid argument. (Service: S3, Status Code: 403, Request ID: null) (SDK Attempt Count: 1)
When stepping a bit into, I can see that SignatureDoesNotMatch
is received.
Reproduction Steps
var credentials = AwsBasicCredentials.create("...", "...");
var s3Client = S3Client.builder()
.credentialsProvider(StaticCredentialsProvider.create(credentials))
.endpointOverride(URI.create("https://storage.googleapis.com"))
.region(Region.of("auto"))
.serviceConfiguration(S3Configuration.builder().pathStyleAccessEnabled(true).build())
.build());
var request =
PutObjectRequest.builder()
.bucket(bucketName)
.key(key)
.contentType(contentType)
.contentLength((long) contents.length)
.build();
s3Client.putObject(request, fromBytes(contents));
Possible Solution
No response
Additional Information/Context
Note: I have seen the following in changelog, could be related:
This change enhances integrity protections for new SDK requests to S3. S3 SDKs now support the CRC64NVME checksum algorithm, full object checksums for multipart S3 objects, and new default integrity protections for S3 requests.
AWS Java SDK version used
2.31.6
JDK version used
21.0.6
Operating System and version
archlinux (up-to-date)
Metadata
Metadata
Assignees
Labels
bugThis issue is a bug.This issue is a bug.closed-for-stalenessp2This is a standard priority issueThis is a standard priority issue