2
votes

I'm trying to understand the real-world usefulness of AWS CloudFormation. It seems to be a way of describing AWS infrastructure as a JSON file, but even then I'm struggling to understand what benefits that serves (besides potentially "recording" your infrastructure changes in VCS).

Of what use does CloudFormation's JSON files serve? What benefits does it have over using the AWS web console and making changes manually?

2

2 Answers

7
votes

CloudFormation gives you the following benefits:

  • You get to version control your infrastructure. You have a full record of all changes made, and you can easily go back if something goes wrong. This alone makes it worth using.

  • You have a full and complete documentation of your infrastructure. There is no need to remember who did what on the console when, and exactly how things fit together - it is all described right there in the stack templates.

  • In case of disaster you can recreate your entire infrastructure with a single command, again without having to remember just exactly how things were set up.

  • You can easily test changes to your infrastructure by deploying separate stacks, without touching production. Instead of having permanent test and staging environments you can create them automatically whenever you need to.

  • Developers can work on their own, custom stacks while implementing changes, completely isolated from changes made by others, and from production.

It really is very good, and it gives you both more control, and more freedom to experiment.

1
votes

First, you seem to underestimate the power of tracking changes in your infrastructure provisioning and configuration in VCS.

Provisioning and editing your infrastructure configuration via web interface is usually very lengthy process. Having the configuration in a file versus having it in multiple web dashboards gives you the much needed perspective and overall glance at what you use and what is it's configuration. Also, when you repeatedly configure similar stacks, you can re-use the code and avoid errors or mistakes.

It's also important to note that AWS CloudFormation resources frequently lag behind development of services available in the AWS Console. CloudFormation also requires gathering some know-how and time getting used to it, but in the end the benefits prevail.