Visualising CloudFormation Stack

Table of Contents

If you work with AWS CloudFormation on a day-to-day basis, I think you might be interested in visualising your AWS CloudFormation templates. CloudFormation stack visualization can be quite handy for lifecycle management of your AWS deployment. In addition, visualization can be immensely helpful in change management and governance.

Visualizing CloudFormation Templates using Graphviz

cloud-formation-viz is a Graphviz based script which takes your CloudForamtion template as input and creates the visualisation. This script requires Python and Graphviz pre-installed.

cat example.template | ./cfviz | dot -Tsvg -oexample.svg
Visualizing CloudFormation Templates using Graphviz
Visualizing CloudFormation Templates using Graphviz

VisualOps

Alternatively, you can use VisualOps to visualise your current AWS stack. VisualOps creates more structured and high-resolution diagrams for your AWS stack and visualisation is one of the many features offered by VisualOps. Using VisualOps, you can either import your existing CloudFormation template to generate the diagram automatically or create AWS CloudFormation templates by utilising a WYSIWYG editor.

Visualization of Apache Mesos CloudFormation Stack using VisualOps
Visualization of Apache Mesos CloudFormation Stack using VisualOps

CloudFormation Designer

Since I wrote this post, AWS has released the CloudFormation Designer which allows one to create and modify CloudFormation templates using a drag-and-drop interface. With this new feature, one can view the contents of any valid AWS CloudFormation template as a diagram and relationship between various AWS resources.

CloudFormation Designer
CloudFormation Designer

Unlike VisualOps, CloudFormation Designer requires a very good understanding of the AWS resources that you want include in your template. On positive side, CloudFormation Designer includes a tabbed JSON editor interface to interact with template components. Tabbed JSON editor provides an auto-complete feature for resource property names. I was really impressed with validation part. For instance, you cannot add an EC2 instance directly inside a VPC unless you create a subnet in the VPC and add the instance to subnet.

CloudFormation Designer
CloudFormation Designer

Last but not least, now you can reverse engineer CloudFormation templates from your existing resources using the CloudFormer utility. How handy is that!

Related Posts

Decoupling Deployment and Release- Feature Toggles

Decoupling Deployment and Release- Feature Toggles

There are key differences between deployment and release. Deployment means putting the latest stable …

Polyglot Persistence Patterns

Polyglot Persistence Patterns

Polyglot persistence which takes a hybrid approach to persistence is getting a lot of traction these …

Visual Regression

Visual Regression

A new breed of tools have started appearing on our radar supporting the very idea of automated …