×
☰ See All Chapters

AWS CloudFormation

In real time webscale applications are increasingly difficult beasts to manage, and trying to do so via manual methods using the AWS Management Console or via CLI and SDK. In our previous examples where we setup EC2 instance involved two more steps for creating key pairs and security groups. In fact, when you are setting up an application in EC2 instance you involve in multiple steps like installing required softwares, integration tests, connectivity test so on. After all you have done the setup and by chance if the EC2 instance is deleted, you need to setup again and downtime is considerable.

Amazon has recognized this issue and developed a management tool that converts the management of webscale applications from an ongoing challenge to a process that leverages a template defining the components of an application, coordinating their launch, and even managing its ongoing. That solution is CloudFormation.

We use the term blueprint when discussing infrastructure automation in general. Blueprints used for AWS CloudFormation, a configuration management service, are called templates. A template is a description of your infrastructure, written in JSON or YAML, that can be interpreted by CloudFormation. The idea of describing something rather than listing the necessary actions is called a declarative approach. Declarative means you tell Cloud Formation how your infrastructure should look. You aren’t telling CloudFormation what actions are needed to create that infrastructure, and you don’t specify the sequence in which the actions need to be executed.

Benefits of CloudFormation

Fast and time-saving

Once a template is prepared you can deploy multiple instances for the application almost instantaneously. You no need to execute multiple commands from AWS CLI or go through multiple steps from AWS console. You can execute template sit and relax.

Programmable

You can insert custom parameters into CloudFormation to customize your templates as you wish.

Replicable and testable

Is your test environment an exact copy of your production environment? Using CloudFormation, you can create two identical infrastructures and keep them in sync. If you can create your architecture from a template, it’s testable. Just start a new infrastructure, run your tests, and shut it down again.

Version management

You can track changes in the template, enabling multiple devops/ developers to work together on non-linear development. So you have a record of what has been done, and you can revert to specific versions should you ever need to. When you use CloudFormation to manage your infrastructure, you can track changes based on which templates you have applied and how they change over time.

Cost-effective

Using CloudFormation comes at no additional charge. If you subscribe to an AWS support plan, you also get support for CloudFormation. Pay- as- you- go feature i.e., cost-effective

 

 


All Chapters
Author