I’m migrating a java project that was using the AWS SDK 1.x to list and iterate through objects lazily in S3.
S3Objects iterableS3Objects = S3Objects.withPrefix(amazonS3, myBucketName, myPrefix);
for (S3ObjectSummary s3ObjectSummary : iterableS3Objects) {
...
}
I’m looking for similar functionality in the AWS SDK for Java 2.x. Is there similar functionality?
I see that in S3Client there’s a “listObjectsV2” method, and that I can specify a prefix there, is that what I’m looking for? Is there a built in way to lazily get the next batch using that, or will I need to build that functionality myself?