How to find total size of a s3 bucket or folder in s3 bucket?

How to check the size of a s3 bucket or size of a file in S3 bucket?

The s3cmd tools provide a way to get the total file size of a s3 bucket using “s3cmd du”

See the example below , below command list all buckets in your account

Now let us find the size of a s3 bucket “neyear1-test”

Output shows the total size is 107445352 bytes ( 0.107GB) and it contains total 26 Objects

Now let us find the size of a folder “shor” in s3  bucket “neyear1-test” , use the following

To find the size of a file in s3 bucket

How to find the s3 bucket size using “aws cli” ?

The “aws cli” tool provides a better way to find the size of the s3 bucket 

You can also mention the folder  ( prefix infact) name

 Official documentation is here . please check it out

Leave a Reply

Your email address will not be published. Required fields are marked *