Skip to content

Instantly share code, notes, and snippets.

View thanandorn's full-sized avatar

Thanandorn Thongsringklee thanandorn

View GitHub Profile
@thanandorn
thanandorn / aws_security_group_details.sh
Created June 22, 2018 12:38 — forked from gh-mlfowler/aws_security_group_details.sh
A quick and dirty script to list out all security group settings on an AWS account. Barely tested, use at own risk, etc. Requires awscli to be installed.
#!/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.
@thanandorn
thanandorn / aws_security_group_details.sh
Last active September 24, 2018 20:17 — forked from gh-mlfowler/aws_security_group_details.sh
A quick and dirty script to list out all security group settings on an AWS account. Barely tested, use at own risk, etc. Requires awscli to be installed.
#!/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.