AWS CloudFormation Documentation

AWS CloudFormation gives you a way to model a collection of related AWS and third-party resources, provision them quickly and consistently, and manage them throughout their lifecycles, by treating infrastructure as code. A CloudFormation template describes your desired resources and their dependencies so you can launch and configure them together as a stack. You can use a template to create, update, and delete an entire stack as a single unit, as often as you need to, instead of managing resources individually. You can manage and provision stacks across multiple AWS accounts and AWS Regions.

Extensibility

Using the AWS CloudFormation Registry, you can model and provision third-party resources and modules. Examples of third-party resources are monitoring, team productivity, incident management, and version control tools, along with resources from APN Partners.

You can build your own resource providers using the AWS CloudFormation CLI, an open-source tool that streamlines the development process, including local testing and code generation capabilities.

Cross account & cross-region management

CloudFormation let you provision a common set of AWS resources across multiple accounts and regions.

Authoring with JSON/YAML

CloudFormation allows you to model your cloud environment in text files. You can use open-source declarative languages, such as JSON or YAML, to describe what AWS resources you want to create and configure.

Authoring with familiar programming languages

With the AWS Cloud Development Kit (AWS CDK), you can define your cloud environment using familiar programming languages, and then provision your infrastructure using CloudFormation directly from your IDE AWS CDK. 

Build serverless applications with SAM

Build serverless applications with the AWS Serverless Application Model (SAM), an open-source framework that provides shorthand syntax to express functions, APIs, databases, and event source mappings. During deployment, SAM transforms and expands the SAM syntax into CloudFormation syntax.

Safety controls

CloudFormation automates provisioning and updating your infrastructure in a controlled manner. You can use Rollback Triggers to specify the CloudWatch alarms that CloudFormation should monitor during the stack creation and update process. If alarms are triggered, CloudFormation is designed to roll back the stack operation to a previously deployed state.

Using ChangeSets, you can preview the proposed changes that CloudFormation intends to make to your infrastructure and application resources prior to execution. CloudFormation determines the operations to perform, provisions resources, and rolls back if errors are encountered. This returns the state of your infrastructure and application resources to the last known state. Using Drift Detection, you can keep track of changes to resources outside CloudFormation.

Preview changes to your environment

Change Sets allow you to preview how proposed changes to a stack might affect your running resources, for example to check whether your changes will delete or replace any particular resources.  CloudFormation makes the changes to your stack after you decide to execute the Change Set.

Dependency management

AWS CloudFormation manages dependencies between your resources during stack management actions. CloudFormation supports determining the correct sequence of actions to take for each resource when performing stack operations.

Git management of stacks

AWS CloudFormation supports updating a stack from a CloudFormation template stored in a remote Git repository. With this feature, you will know if a stack deployment succeeded or failed, without having to navigate away from your remote repository.

Additional Information

For additional information about service controls, security features and functionalities, including, as applicable, information about storing, retrieving, modifying, restricting, and deleting data, please see https://docs.aws.amazon.com/index.html. This additional information does not form part of the Documentation for purposes of the AWS Customer Agreement available at http://aws.amazon.com/agreement, or other agreement between you and AWS governing your use of AWS’s services.