Reputation: 8504
I have a Scala Play 2
app and using AWS S3 API
to read from S3 files. I have a need to determine when the last modified timestamp is for a file, what's the best way to do that? Is it using getObjectMetadata
or perhaps listObjects
or ? If possible, I would like to determine the timestamps for multiple files in one call. Are there other open source libraries built on top of AWS S3 APIs
?
Upvotes: 1
Views: 3493
Reputation: 1977
A representation of S3 Object in AWS Java SDK is S3ObjectSummary
, which has method getLastModified
. It returns the modified timestamp.
Ideally just list all of the files using listObjects and than call getObjectSummaries
on a returned object.
Upvotes: 1