run command :
aws s3api list-objects --bucket BUCKETNAME --prefix FOLDERNAME1/FOLDERNAME2/ --output json --query "Contents[?contains(Key, `SearchKeyword`)]"
How to sum :
aws s3api list-objects --bucket BUCKETNAME --prefix FOLDERNAME1/FOLDERNAME2/ --output json --query "[sum(Contents[?contains(Key, `SearchKeyword`)].Size), length(Contents[?contains(Key, `SearchKeyword`)])]"
No comments:
Post a Comment