Find Size of Amazon S3 Bucket

From Tech Wiki
Jump to navigation Jump to search

To find the size of an Amazon S3 Bucket use the following command:

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

This requires you to first run:

aws configure

To set up your account credentials with the api.