2021-12-04

S3 show buckets last modified

I'm trying to list the last modified file in S3 buckets for a report but the report is showing the first modified (ie when the first file was uploaded not the last file).

I'm using this:

top_level_folders[folder]['modified'] = obj.last_modified

and adding to the report here:

report.add_row([folder[1]['name'], folder[1]['objects'], 
str(round(folder[1]['size'],2)), status, folder[1]['modified']])

I've tried adding

=obj.last_modified, reverse=True but keep getting invalid syntax errors.

This is what the report looks like:

Sample Report



from Recent Questions - Stack Overflow https://ift.tt/3EmXBrl
https://ift.tt/31sKg27

No comments:

Post a Comment