0
votes

I'd to ask how to filter the standard storage of s3 bucket filtering by current date only.

using this command:

aws s3api list-objects-v2 --bucket videos --prefix Genre --query "Contents[?StorageClass=='STANDARD'].Key" --output text | sed 's/\t/\n/g'

1
You mean objects added to the bucket today or object names that has current date? - notionquest
objects added to the bucket today - user7707234

1 Answers

0
votes

Here is the command to filter object based on LastModified attribute.

aws s3api list-objects-v2 --bucket videos --prefix Genre --query "Contents[?LastModified>'2017-03-14T00:00:00.000Z'].Key" --output text | sed 's/\t/\n/g'