Created
February 27, 2018 13:49
-
-
Save woffleloffle/673b63f03899777ac211ce269e6f679e to your computer and use it in GitHub Desktop.
Count the size of an S3 Bucket (or sub-path) in Gigabytes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aws --profile {PROFILE} s3 ls s3://{BUCKET_NAME}/{PATH_NAME} --recursive | awk 'BEGIN {total=0}{total+=$3}END{print total/1024/1024/1024" GB"}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment