Created
February 14, 2019 21:05
-
-
Save activeshadow/7ede6ba0412392ddc70cdf53926867f0 to your computer and use it in GitHub Desktop.
Remove AWS WAF IP Sets
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 | |
SETS=$(aws waf list-ip-sets | jq -r ".IPSets[] | .IPSetId") | |
for ipset in $SETS; do | |
TOKEN=$(aws waf get-change-token | jq -r .ChangeToken) | |
aws waf delete-ip-set --ip-set-id $ipset --change-token $TOKEN | |
sleep 1 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment