- Newest
- Most votes
- Most comments
S3 Calculate Total Size on console will use the ListObjectsV2 in background.
Important point to note here is, it returns up to 1000 objects per API call, so a bucket with huge number of objects will require multiple List API calls to list the objects and Sum the bytes of them.
S3 inventory is the most cost effective way to get the size of different "folders" on a bucket with millions of objects. Also s3 inventory has an added advantage that, it can query as many times and won't incur extra cost. Where as ListObjectsV2 will incur costs every time they list the bucket.
Hope you find this useful.
Abhishek
The "total size calculation" should possibly be running the "s3 ls" API in the background.
So, there may be a fee for multiple runs.
As per the following documentation, S3 also states that a "List" action will generate 0.005 USD per 1000 actions.
https://aws.amazon.com/s3/pricing/?nc1=h_ls
https://aws.amazon.com/blogs/storage/find-out-the-size-of-your-amazon-s3-buckets/#:~:text=To%20find%20the%20size%20of,of%20bytes%20stored%20over%20time.
Relevant content
- asked a year ago
- AWS OFFICIALUpdated 7 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
Hey John, Does it answer your question, just curious if I can provide more info on this.
yes. this helps. thank you!
s3 inventory also have some charges which is half of the ListObjectv2. Are there free options?