When software becomes automated, it is inevitable that it will trickle down to the backend infrastructure. When shell scripting is the basis of automation for a single Linux server, Cloudformation is the automation system for the AWS cloud. Setting up and scaling large cloud infrastructure can now be done at the click of a button. Didn’t like the configuration, change it with a changeset. It is that easy.
We created a cloud formation template that can set up an entire project infrastructure, load the application files from S3 and automatically deploy it in Lambda.
The associated VPC, Internet gateway, RDS, Redis, Lambda, Cloudwatch events etc were all automatically created. The same template could be run to set up a dev, stg or prod environments by selecting from a dropdown.
The reason for creating this setup was that the customer wanted the portability of the application between AWS accounts. This way they just had to upload the application to S3 and mention the bucket name while running the template to deploy the application in minutes. They also wanted an easy setup of different release environments like dev, stg and prod with varying load capacity for testing. Thus cloud formation enabled it to be reliable and repeatable to setup cloud infrastructure.
Even though getting started on cloud formation is a difficult task, in the beginning, it can be an exceptional tool once you get the hang of it.