Archive

Posts Tagged ‘bucket’

Amazon count and list file from bucket

February 24, 2016 Leave a comment

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: , , ,