Created
November 3, 2021 06:46
-
-
Save montao/c789e21149780fb15b585050e09365a3 to your computer and use it in GitHub Desktop.
Delete bucket(s) from s3 like rm -rf
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
# replace "fuzzbazz" with a word that matches a sequence of characters in the name of the bucket(s) you wish to delete | |
for bucket in $(aws s3 ls | awk '{print $3}' |grep "fuzzbazz"); do aws s3 rb "s3://${bucket}" --force; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment