at the moment there's some files being uploaded where they are getting corrupted. They'll have a filesize of 0 bytes. May I ask how do I query my s3 bucket and filter by specific size, i'm trying to query when byte is 0?
At the moment I have two queries.
First one list all the files recursively in the bucket but no sorting.
aws s3 ls s3://testbucketname --recursive --summarize --human-readable
Second one sorts but only when provided a prefix, in my case the prefix is the folder name. My current bucket structure is as followed {accountId}/{filename}
aws s3api list-objects-v2 --max-items 10 --bucket testbucketname --prefix "30265" --query "sort_by(Contents,&Size)"
30265 is the accountId/folder name. When the prefix isn't provided, the sort doesn't quite work.
Any help would be greatly appreciated.
This query works well for filtering the name which is a string
aws s3api list-objects --bucket testbucketname --query "Contents[?contains(Key, '.jpg')]"
Unfortunately I couldn't use contains for Size and there isn't a equals.

aws s3api list-objects-v2 --bucket example-bucket --query 'Contents[?Size==`0`].Key'(Use"instead of'on Windows)?