martonsz
1/26/2015 - 11:57 AM

Query 'amazon s3 bucket size with AWS Command Line Interface

Query 'amazon s3 bucket size with AWS Command Line Interface

aws s3api list-objects --bucket BUCKE-NAME --output json --query "[sum(Contents[].Size), length(Contents[])]"

# Example result
# [
#    2972825080,
#    1589
#]