Created
January 23, 2019 22:34
-
-
Save vanrysss/6daabdcf978dac4dab52973ef63fa7dd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| for line in $(aws s3api list-buckets --query 'Buckets[?starts_with(Name, `prd-`) == `true` && contains(Name, `dead-letter`) == `true`].Name' | jq '.[]' -r) | |
| do | |
| echo "$line" | |
| aws s3 ls $line --recursive --summarize | grep "Total Objects:" | |
| done | |
| --recursive --summarize | grep "Total Objects:" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment