Skip links

What is AWS CloudFormation?

AWS CloudFormation is a service that helps you model and set up your AWS resources so that you can spend less time managing those resources while spending time to focus on your applications  running on AWS. Here, you create a template that describes all the AWS resources that you want, eg: Like Amazon EC2 instances or Amazon RDS DB instances, and CloudFormation which takes care of provisioning and configuring those resources for you. You don’t need to individually create and configure AWS resources and figure out what’s dependent on what. But,  CloudFormation handles that for you. 

The following scenarios demonstrate how CloudFormation can help!

How to simplify infrastructure management. 

For a scalable web application that also includes a backend with a database, you might use an Auto Scaling group, an Elastic Load Balancing load balancer, and an Amazon Relational Database Service database instance. You have to use each individual service to provision these resources and after that, you create the resources. You would also have to configure them to work together. All these tasks can add complexity and time before you even get your application up and running. So, instead, you can create a CloudFormation template or modify an existing one. A template describes all your resources and their properties. When you use that template to create a CloudFormation stack, CloudFormation provides the Auto Scaling group, load balancer, and database for you. After the stack has been successfully created, your AWS resources are up and running. You can also delete the stack just as easily. This will delete all the resources in the stack. By using CloudFormation, you easily manage a collection of resources as a single unit.

How to quickly replicate your infrastructure.

If your application requires additional availability, then you might replicate it in multiple regions so that if one region becomes unavailable, your users can still use your application in other regions. The challenge in replicating your application is that it also requires you to replicate your resources as well. Not only do you need to record all the resources that your application requires, but you must also provision and configure these resources in each region.

You can reuse your CloudFormation template to create your resources in a consistent and repeatable manner. To reuse your template, you have to describe your resources once and then provision the same resources over and over in multiple regions.

How to easily control and track changes to your infrastructure

In some cases, you might have underlying resources that you want to upgrade incrementally. For example, you might change to a higher performing instance type in your Auto Scaling launch configuration so that you can reduce the maximum number of instances in your Auto Scaling group. If problems occur after you complete the update, you might need to roll back your infrastructure to the original settings. To do this manually, you not only have to remember which resources were changed, you also have to know what the original settings were.

When you provision your infrastructure with CloudFormation, the CloudFormation template describes exactly what resources are provisioned and their settings. Because these templates are text files, you simply track differences in your templates to track changes to your infrastructure, similar to the way developers control revisions to source code. For example, you can use a version control system with your templates so that you know exactly what changes were made, who made them, and when. If at any point you need to reverse changes to your infrastructure, you can use the previous version of your template.

Leave a comment

This website uses cookies to improve your web experience.
Explore
Drag