AWS S3: how do I see how much disk space is using

KennyPowers picture KennyPowers · Jan 23, 2012 · Viewed 108.5k times · Source

I have AWS account. I'm using S3 to store backups from different servers. The question is there any information in the AWS console about how much disk space is in use in my S3 cloud?

Answer

cudds picture cudds · Jan 27, 2014

Yippe - an update to AWS CLI allows you to recursively ls through buckets...

aws s3 ls s3://<bucketname> --recursive  | grep -v -E "(Bucket: |Prefix: |LastWriteTime|^$|--)" | awk 'BEGIN {total=0}{total+=$3}END{print total/1024/1024" MB"}'