You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I acknowledge the upcoming end-of-support for AWS SDK for Java v1 was announced, and migration to AWS SDK for Java v2 is recommended.
Describe the bug
I am using AWS Java S3 SDK, the SDK version is 2.27.21, when implementing upload, download, and delete, the client has the same configuration information, uploading, downloading, and deleting have no problem, but when calling deleteObjects, 302 is returned. The request ID is null and the code is as follows:
List deleteObjects = fileKeys.stream().map(fileKey -> ObjectIdentifier.builder().key(fileKey).build())
.collect(Collectors.toList());
Delete batchDelete = Delete.builder().objects(deleteObjects).build();
DeleteObjectsRequest batchDeleteRequest = DeleteObjectsRequest.builder()
.bucket(bucketName).delete(batchDelete)
.build();
DeleteObjectsResponse response = s3Client.deleteObjects(batchDeleteRequest);
What is the reason why only deleteObjects return 302, and the single deleteObject is fine
Regression Issue
Select this option if this issue appears to be a regression.
Expected Behavior
delete success
Current Behavior
throw Exception:software.amazon.awssdk.services.s3.model.S3Exception: (Service: S3, Status Code: 302, Request ID: null)
Upcoming End-of-Support
Describe the bug
I am using AWS Java S3 SDK, the SDK version is 2.27.21, when implementing upload, download, and delete, the client has the same configuration information, uploading, downloading, and deleting have no problem, but when calling deleteObjects, 302 is returned. The request ID is null and the code is as follows:
List deleteObjects = fileKeys.stream().map(fileKey -> ObjectIdentifier.builder().key(fileKey).build())
.collect(Collectors.toList());
Delete batchDelete = Delete.builder().objects(deleteObjects).build();
DeleteObjectsRequest batchDeleteRequest = DeleteObjectsRequest.builder()
.bucket(bucketName).delete(batchDelete)
.build();
DeleteObjectsResponse response = s3Client.deleteObjects(batchDeleteRequest);
What is the reason why only deleteObjects return 302, and the single deleteObject is fine
Regression Issue
Expected Behavior
delete success
Current Behavior
throw Exception:software.amazon.awssdk.services.s3.model.S3Exception: (Service: S3, Status Code: 302, Request ID: null)
Reproduction Steps
this.s3Client = S3Client.builder()
.credentialsProvider(credentials)
.region(region)
.httpClient(sdkHttpClient)
.build();
List deleteObjects = fileKeys.stream().map(fileKey -> ObjectIdentifier.builder().key(fileKey).build())
.collect(Collectors.toList());
Delete batchDelete = Delete.builder().objects(deleteObjects).build();
DeleteObjectsRequest batchDeleteRequest = DeleteObjectsRequest.builder()
.bucket(bucketName).delete(batchDelete)
.build();
DeleteObjectsResponse response = s3Client.deleteObjects(batchDeleteRequest);
Possible Solution
No response
Additional Information/Context
No response
AWS Java SDK version used
2.27.21
JDK version used
8
Operating System and version
mac
The text was updated successfully, but these errors were encountered: