Bucket owners or users who have the s3:ListBucket permission (the permission is configured in the bucket policy) can view the storage information about the bucket, including bucket size and number of objects.
For details about how to configure a bucket policy, see section Configuring a Bucket Policy.
s3cmd du s3://my-bucket
my-bucket is the name of the bucket whose storage information you want to view.
In the command output, the storage information about the bucket is displayed in the following format:
Bucket size Number of objects s3://my-bucket/
The unit of the bucket size is KB.