Skip to content

Instantly share code, notes, and snippets.

@tsertkov
Last active January 27, 2018 11:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tsertkov/cf1438f4a07f79cee075ca52c8ec7549 to your computer and use it in GitHub Desktop.
Save tsertkov/cf1438f4a07f79cee075ca52c8ec7549 to your computer and use it in GitHub Desktop.
Mass remove s3 buckets based on name pattern
aws s3 ls \
| grep -e 'pr.*\.example\.com' \
| cut -d ' ' -f 3 \
| xargs -I {} -L 1 aws s3 rb s3://{} --force
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment