I'm trying to use AWS CLI to query S3 objects owned by a specific account AND only if the object has a specific size. Is there any way to do an AND query? These are some of the hundreds of alternatives I've already tried but none of them worked:
aws s3api list-objects-v2 --bucket bucket-name --fetch-owner --output json --query "'Contents[?Size==`0`].[Key,Owner.ID,Size]' || [?Owner.ID=='00000000111111122222222aaabbbcccdddeeefff']"
aws s3api list-objects-v2 --bucket bucket-name --fetch-owner --output json --query "Contents[?Owner.ID=='00000000111111122222222aaabbbcccdddeeefff']||[?Size==`0`].[Key,Size]"
Any help is welcome!
Thanks in advance!