Documentation

Find Size of Amazon S3 Bucket

Categories
A
Adam Birds
Published 10 August 20261 min read1 views

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.

Last updated: 10 August 2026v1