Closed jodastephen closed 5 months ago
@jodastephen bug acknowledged. But we probably won't fix it before maintenance mode phase.
The recommendation here is to use Java SDK v2 built-in Paginators - https://sdk.amazonaws.com/java/api/latest/software/amazon/awssdk/services/s3/S3Client.html#listObjectsV2Paginator(java.util.function.Consumer)
Closing this, we don't have plans to fix before going into Maintenance Mode.
This issue is now closed.
Comments on closed issues are hard for our team to see. If you need more assistance, please open a new issue that references this one.
Upcoming End-of-Support
Describe the bug
The method
AmazonS3Client::listNextBatchOfObjects(ListNextBatchOfObjectsRequest)
takes a standard request object that contains the propertyRequestCredentialsProvider
(inherited fromAmazonWebServiceRequest
). However, the implementation uses the methodListNextBatchOfObjectsRequest::toListObjectsRequest()
which does not copy the credentials provider (and other properties) to theListObjectsRequest
. As a result, our code failed to have the correct credentials to query S3.Expected Behavior
The code should copy the request credentials across. The class
ListNextBatchOfVersionsRequest
does this correctly.Current Behavior
This is the broken code in
ListNextBatchOfObjectsRequest
:This is the correct kind of code in
ListNextBatchOfVersionsRequest
, note how the extra properties are copied across:Reproduction Steps
No need for SSCCE. Information above is sufficient.
Possible Solution
No response
Additional Information/Context
The git repo shows the code is still broken https://github.com/aws/aws-sdk-java/blob/master/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/model/ListNextBatchOfObjectsRequest.java#L74
AWS Java SDK version used
1.12.609
JDK version used
8
Operating System and version
Windows 11