Closed
Description
Describe the bug
SDK 2.30.17 fails with an InvalidRequestException when trying to delete objects on an S3 multi-region access point.
The same code works with SDK 2.29.52
Regression Issue
- Select this option if this issue appears to be a regression.
Expected Behavior
The S3 DeleteObjects API should work as it did with SDK 2.29
Current Behavior
software.amazon.awssdk.services.s3.model.InvalidRequestException: x-amz-sdk-checksum-algorithm specified, but no corresponding x-amz-checksum-* or x-amz-trailer headers were found. (Service: S3, Status Code: 400, Request ID: 7FBWJHRPYNQXGZ4G, Extended Request ID: 7q8nLrvVN+p/hIB3gCe/KlIFComVGNdSVGkPPV+8mnpxuLWyF8vyITHt3qzAyVMwi29DLVInycQ=)
Reproduction Steps
var s3Client = S3Client.builder()
.region("eu-west-1);
.build();
var apArn = "arn:aws:s3::1234567890:accesspoint/abcdefg.mrap";
var paginatedResponse = s3Client.listObjectsV2Paginator(ListObjectsV2Request.builder()
.bucket(apArn)
.prefix(path)
.maxKeys(1000)
.build());
for (var aPage : paginatedResponse) {
var objectIds = aPage.contents().stream()
.map(s3Object -> ObjectIdentifier.builder()
.key(s3Object.key())
.build())
.toList();
if (objectIds.isEmpty()) {
break;
}
s3Client.deleteObjects(DeleteObjectsRequest.builder()
.bucket(apArn)
.delete(Delete.builder()
.objects(objectIds)
.build())
.build());
}
Possible Solution
Downgrade to SDK 2.29
Additional Information/Context
No response
AWS Java SDK version used
2.30.17
JDK version used
21.0.5-11
Operating System and version
AWS ECS Fargate arm64 running a bellsoft/liberica-openjre-alpine-musl:21.0.5-11 container