import boto3 s3 = boto3.resource('s3') bucket = s3.Bucket('bucket-name') for object in bucket.objects.all(): print(object.key) import boto3 import datetime as dt s3 = boto3.resource('s3') retention_period = 100 bucket = s3.Bucket('bucket-name') # check each file if it is expired or not for object in bucket.objects.all(): gap = dt.datetime.now(dt.timezone.utc) - object.last_modified if gap.days > r
{{#tags}}- {{label}}
{{/tags}}