You can use the below command in the CLI to get all the details about a bucket which also includes the buckets total size. This is the easiest way to do this.
$ aws s3 ls s3://bucketname/foldername --summarize --human-readable --recursive
So this will list the information about the bucket you have mentioned. If you want to check for a particular folder, then provide the folder name.
--human-readable -- This will give the details is easy reable format