Created
July 18, 2017 17:45
-
-
Save mclarke47/6c88127bc40b607825bfb29f7d62fcf8 to your computer and use it in GitHub Desktop.
AWS delete all the security groups with the matching description
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
aws ec2 describe-security-groups | jq -r '.SecurityGroups[] | select(.Description | contains("ingress")) | .GroupId' |xargs -I % aws ec2 delete-security-group --group-id % |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment