I need to fetch the object metadata based on the last modified time from Java SDK
I can fetch the data based on last modified time from AWS CLI but I need the same thing from java SDK
I used the following command to get the data
s3api list-objects --bucket aws-codestar-us-east-2-148844964152052 --query "Contents[?LastModified>='2020-02-28T09:34:50+00:00'].{Key: Key, Size: Size,LastModified:LastModified}"
response is:
[
{
"Key": "abc.png",
"Size": 361211,
"LastModified": "2020-03-04T12:11:14+00:00"
},
{
"Key": "btest.png",
"Size": 513624,
"LastModified": "2020-02-28T09:34:50+00:00"
}
]
I am expecting the same response from AWS s3 SDK
Thanks for your time.