Reputation: 11
Just as the title said.How can I use python-boto3 to get the last modify time for a file in amazon-s3? Thanks.
Upvotes: 1
Views: 4930
Reputation: 13176
In boto3, you can use s3.client.head_object()
this will return a dict of meta data for the particular object. You just need to look into the LastModified element.
'LastModified': datetime(2015, 1, 1)
Upvotes: 2