Skip to content

Instantly share code, notes, and snippets.

@swamibluedata
Created August 25, 2020 17:18
Show Gist options
  • Save swamibluedata/14acbd312dd062635487b0782fcc3c3b to your computer and use it in GitHub Desktop.
Save swamibluedata/14acbd312dd062635487b0782fcc3c3b to your computer and use it in GitHub Desktop.
#!/bin/bash
ALL_BUCKETS=$(aws s3 ls s3:// | awk '{print $3}')
for bucket in $ALL_BUCKETS
do
echo "BUCKET: $bucket"
aws s3 ls s3://$bucket --recursive --human-readable --summarize | tail -2
echo
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment