I need to list the recently loaded s3 files. I'm using boto3 to do the same. I found lots of sources listing objects first and then filtering objects based on timestamp from the dict that the list_objects function return. But is there a way to list s3 files based on the last modified timestamp? I mean to ask whether there is any way in which we can pass the timestamp to the list_objects_v2 function to list files whose lastModified timestamp is greater than the timestamp passed?
Asked
Active
Viewed 197 times
0
-
1No, there is not. – luk2302 Jun 21 '21 at 12:15
-
You should take care to understand what lastModified actually represents on S3 objects if you are going to process files based upon this piece of metadata. S3 objects cannot be modified, for example; they can only be replaced. I believe that lastModified represents the creation time of the object (see [here](https://stackoverflow.com/questions/40698341/s3-last-modified-timestamp-for-eventually-consistent-overwrite-puts)). – jarmod Jun 21 '21 at 14:32