Infrastructure as code with AWS CloudFormation
AWS's CloudFormation guide describes a template that lists the AWS resources you want and a stack that provisions and configures them as a single unit.
On AWS, the description of your infrastructure lives in a CloudFormation template, and CloudFormation provisions and configures the resources that template lists. AWS's CloudFormation guide says you create a template that describes all the AWS resources you want, such as Amazon EC2 instances or Amazon RDS DB instances, and CloudFormation takes care of provisioning and configuring those resources. Turning that template into a stack is the step that puts the resources in place.
Template first, stack second
The guide's "Simplify infrastructure management" section walks through a scalable web application with a backend database: an Auto Scaling group, an Elastic Load Balancing load balancer and an Amazon Relational Database Service database instance. Provisioning each one through its own service and then configuring them to work together adds complexity and time before the application is running. A CloudFormation template describes all the resources and their properties instead.
When you use that template to create a CloudFormation stack, CloudFormation provisions the Auto Scaling group, the load balancer and the database for you. After the stack has been successfully created, the AWS resources are up and running. The page also notes that you don't need to individually create and configure AWS resources and work out what depends on what, because CloudFormation handles that.
Deleting a stack deletes its resources
The same section says you can delete the stack in the same way, and that deleting the stack deletes all the resources in the stack. The guide frames this as managing a collection of resources as a single unit.
Reusing one template across Regions
The "Quickly replicate your infrastructure" section starts from availability. If an application needs additional availability, you might replicate it in multiple Regions so that if one Region becomes unavailable, users can still use the application in other Regions. Replicating the application also requires replicating its resources, which means recording everything the application needs and then provisioning and configuring those resources in each Region.
The section's answer is to reuse the template: describe your resources once, then provision the same resources over and over in multiple Regions. It describes the result as consistent and repeatable.
The Amazon EC2 user guide's CloudFormation paragraph covers the same ground with one added detail. It says Amazon EC2 supports creating resources using CloudFormation, and that templates can be reused to provision the same resources multiple times, whether in the same Region and account or in multiple Regions and accounts. That page also gives the template format as JSON or YAML.
Neither passage names specific Region codes. AWS Region codes for Australia are listed in this site's Australian regions reference.
Tracking changes through the template
The "Easily control and track changes to your infrastructure" section uses an incremental upgrade as its example: changing to a higher performing instance type in an Auto Scaling launch configuration so that the maximum number of instances in the Auto Scaling group can be reduced. If problems occur after the update, you might need to roll the infrastructure back to the original settings. Doing that by hand means remembering which resources changed and what the original settings were.
With CloudFormation, the template describes exactly what resources are provisioned and their settings. Because the templates are text files, the section says you track differences in your templates to track changes to your infrastructure, similar to the way developers control revisions to source code. You can use a version control system with your templates, so you know what changes were made, who made them and when. If you need to reverse changes to your infrastructure, you can use a previous version of your template.
Where CloudFormation is available
The "Getting started with CloudFormation" section lists access through the CloudFormation console, API, AWS CLI, AWS SDKs and several integrations.
What the passages leave open
- The "Quickly replicate your infrastructure" section describes replicating in multiple Regions but does not name Region codes or explain how to choose them.
- The "Getting started with CloudFormation" section lists interfaces and integrations but does not describe template syntax or how a stack is updated.
- The Amazon EC2 page's CloudFormation paragraph gives the JSON or YAML format and the reuse options but does not list supported EC2 resource types or properties; it refers to the EC2 resource type reference for those.
- The "Related information" section of the CloudFormation page points to a separate pricing page and states no pricing model in the passage itself.
Frequently asked questions
Can one CloudFormation template be used in more than one AWS Region?
Yes. The "Quickly replicate your infrastructure" section says you can describe your resources once and then provision the same resources over and over in multiple Regions. The Amazon EC2 page's CloudFormation paragraph says the same resources can be provisioned multiple times, whether in the same Region and account or in multiple Regions and accounts.
What happens to resources when a CloudFormation stack is deleted?
The "Simplify infrastructure management" section says you can delete the stack, and that deleting the stack deletes all the resources in the stack.
What format does a CloudFormation template take?
The "Easily control and track changes to your infrastructure" section describes the templates as text files. The Amazon EC2 user guide's CloudFormation paragraph says you create a template in JSON or YAML format.
Sources
- What is CloudFormation? (AWS CloudFormation User Guide) — Amazon Web Services
- What is Amazon EC2? (Amazon EC2 User Guide) — Amazon Web Services
Checked 30 November 2026