This file contains 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 | |
# Requires: awscli (http://aws.amazon.com/cli/) | |
# Prints out a list of all security groups and their settings, just for quickly auditing it. | |
# Want to do this for all regions... | |
REGIONS=(`aws ec2 describe-regions --region us-west-1 --output text | grep "-" | awk -F $'\t' '{print $3}'`) | |
for REGION in ${REGIONS[*]}; do | |
echo "=> $REGION" | |
# Grab all the security group info for this region in one call. |