I am searching my s3 bucket and I would like to know how can I check total number of objects (files) I have uploaded inside particular S3 Bucket on amazon web server? I am looking for easy solution here.
Method 1:
Method 2:
Using S3 API
aws s3api list-objects --bucket BUCKETNAME --output json --query "[length(Contents[])]"
For a specific folder
aws s3api list-objects --bucket BUCKETNAME --prefix "folder/subfolder/" --output json --query "[length(Contents[])]"
Method 3:
Using AWS CLI
aws s3 ls s3://bucketName/path/ --recursive --summarize | grep "Total Objects:"
Total Objects: 4023
Subscribe to our weekly Newsletter & Keep getting latest article/questions in your inbox weekly