aws / aws/aws-cli

Get total size of all buckets with `aws s3 ls --summarize`

Open
#6,799 2 comments 11 reactions 0 assignees View on GitHub
feature-request p3 s3
Dominant language
Python
Stars
17.3k
Forks
4.6k
Avg merge
1d 2h
Merged PRs (30d)
13

Description

**Is your feature request related to a problem? Please describe.**
Currently when running `aws s3 ls --summarize` it returns:
```
[s3-bucket-1]
[s3-bucket-2]
...

Total Objects: 0
Total Size: 0
```

**Describe the solution you'd like**
`aws s3 ls --summarize` to return the Total Objects and Total Size of all buckets:

```
[s3-bucket-1] (Total Objects: N | Total Size: N)
[s3-bucket-2] (Total Objects: N | Total Size: N)
...

Total Objects: [Combined Objects]
Total Size: [Combined Size]
```

**Describe alternatives you've considered**
A workaround script could loop through each bucket and parse this info with a command like this:
`aws s3 ls my-bucket-name --summarize --recursive --human-readable | tail -2`

(^This would be easier if there were a `--summary-only` option as requested here: https://github.com/aws/aws-cli/issues/2250)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.