I am trying to retrive the list of contents inside the S3 bucket
using aws-java sdk 2
and S3 async client
. However after running the below code, I dont see any output even though the bucket has one object inside it. Am I missing something here?
ListObjectsV2Request request = ListObjectsV2Request .builder().bucket("my-bucket").build();
ListObjectsV2Publisher response = s3AsyncClient.listObjectsV2Paginator(request);
response.contents().subscribe(s3object -> System.out.println(s3object));