Visualize AWS VPC security groups.
Switch branches/tags
Nothing to show
Clone or download
Latest commit d321071 May 28, 2018
Failed to load latest commit information.
bin initial commit Feb 1, 2015
docker Added a Dockerfile May 26, 2018
docs fix example output Feb 2, 2015
lib bump up version Dec 7, 2016
.gitignore ignore result.json Feb 2, 2015
Gemfile initial commit Feb 1, 2015
LICENSE.txt initial commit Feb 1, 2015 bump up version Dec 7, 2016
Rakefile initial commit Feb 1, 2015
sgviz.gemspec add homepage Feb 2, 2015


A visualization tool for AWS VPC Security Groups.


Add this line to your application's Gemfile:

gem 'sgviz'

And then execute:

$ bundle

Or install it yourself as:

$ gem install sgviz

Graphviz is required to generate graphs.

$ brew install graphviz


$ sgviz generate --output-path myvpc --region ap-northeast-1 --vpc-ids vpc-146fad71

will generate


If you're using OSX, run sgviz open to view the graph instantly.

Run sgviz help to view more usage.

CloudFormation Template

You can create example stack using bundled CloudFormation template.

$ aws cloudformation create-stack --stack-name example  --template-body file:////path/to/this/repo/docs/cfn/example.json

Or use Kumogata, powerful Ruby-CFn integration tool.

$ kumogata create docs/cfn/example.rb example

Or use cloudformation-ruby-dsl, another powerful CloudFormation templating tool.

TODO, Known Bugs

  • Rebuild
  • Bug: Problem with outbound edges (duplicate with inbound?).
  • TODO: Internal IP address nodes.
  • TODO: VPC Peerings.
  • TODO: Add spec. (No test code now. Sorry.)
  • TODO: Integrate EC2/ELB/RDS/ElastiCache/Redshift components in graph.
  • etc...


  1. Fork it ( )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request