Reputation: 806
For example, if I want to filter the files by their name, I would do:
$ aws s3api list-objects --bucket bucket-name --query "Contents[?contains(Key, 'key-name')]"
I'm looking for a similar command to filter the size of these files, using the "<" and ">" operators.
Upvotes: 1
Views: 2985
Reputation: 806
I found out what was my mistake. I was using single quote instead of ` and therefore it wasn't working. The answer to the question is:
aws s3api list-objects --bucket bucket-name --query 'Contents[?Size<`2000`]'
Upvotes: 4