Skip to content

Instantly share code, notes, and snippets.

@mclarke47
Created July 18, 2017 17:45
Show Gist options
  • Save mclarke47/6c88127bc40b607825bfb29f7d62fcf8 to your computer and use it in GitHub Desktop.
Save mclarke47/6c88127bc40b607825bfb29f7d62fcf8 to your computer and use it in GitHub Desktop.
AWS delete all the security groups with the matching description
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