aws s3api list-objects --bucket YOUR_BUCKET_NAME --output json --query "[sum(Contents[].Size), length(Contents[])]" | awk 'NR!=2 {print $0;next} NR==2 {print $0/1024/1024/1024" GB"}'
Created
October 23, 2017 12:10
-
-
Save softberries/0b27f7bc9ef4db1bfa4680bd8e089dd6 to your computer and use it in GitHub Desktop.
Command to get the size of the bucket
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment