Home > AWS > Amazon count and list file from bucket

Amazon count and list file from bucket

Count total bucket size

Command 1
aws s3api list-objects –bucket BUCKETNAME –output json –query “[sum(Contents[].Size), length(Contents[])]”

**Return TotalSize/FileCount**

OR

aws s3 ls –summarize –human-readable –recursive s3://bucket-name/directory

Categories: AWS Tags: , , ,
  1. No comments yet.
  1. No trackbacks yet.

Leave a comment