AWS CloudFormation - Overview of Deployment Options on AWS

AWS CloudFormation

AWS CloudFormation is a service that enables customers to provision and manage almost any AWS resource using a custom template language expressed in YAML or JSON. A CloudFormation template creates infrastructure resources in a group called a “stack,” and allows you to define and customize all components needed to operate your application while retaining full control of these resources. Using templates introduces the ability to implement version control on your infrastructure, and the ability to quickly and reliably replicate your infrastructure.

CloudFormation offers granular control over the provisioning and management of all application infrastructure components, from low-level components such as route tables or subnet configurations, to high-level components such as CloudFront distributions. CloudFormation is commonly used with other AWS deployment services or third-party tools; combining CloudFormation with more specialized deployment services to manage deployments of application code onto infrastructure components.

AWS offers extensions to the CloudFormation service in addition to its base features:

Table 1: AWS CloudFormation deployment features

Capability Description

CloudFormation will automatically create and update infrastructure components that are defined in a template.

Refer to AWS CloudFormation Best Practices for more details on creating infrastructure using CloudFormation templates.


CloudFormation templates offer extensive flexibility to customize and update all infrastructure components.

Refer to CloudFormation Template Anatomy for more details on customizing templates.


Update your CloudFormation templates to alter the resources in a stack. Depending on your application architecture, you may need to use an additional deployment service to update the application version running on your infrastructure.

Refer to Deploying Applications on EC2 with AWS CloudFormation for more details on how CloudFormation can be used as a deployment solution.

Scale CloudFormation will not automatically handle infrastructure scaling on your behalf; however, you can configure auto scaling policies for your resources in a CloudFormation template.

CloudFormation provides native monitoring of the success or failure of updates to infrastructure defined in a template, as well as “drift detection” to monitor when resources defined in a template do not meet specifications. Additional monitoring solutions will need to be in place for application-level monitoring and metrics.

Refer to Monitoring the Progress of a Stack Update for more details on how CloudFormation monitors infrastructure updates.

The following diagram shows a common use case for CloudFormation. Here, CloudFormation templates are created to define all infrastructure components necessary to create a simple three-tier web application. In this example, we are using bootstrap scripts defined in CloudFormation to deploy the latest version of our application onto EC2 instances; however, it is also a common practice to combine additional deployment services with CloudFormation (using CloudFormation only for its infrastructure management and provisioning capabilities). Note that more than one CloudFormation template is used to create the infrastructure.

AWS CloudFormation use case

Figure 1: AWS CloudFormation use case