CloudFormation Concepts
AWS CloudFormation is a declarative tool for provisioning AWS infrastructure. Templates are written in YAML or JSON and deployed as stacks.
What It Does Well
- Automates AWS resource creation.
- Supports disaster recovery and repeatable environment creation.
- Makes infrastructure changes reviewable like application code.
- Helps copy patterns across regions or environments.
Core Concepts
- Template: the declarative definition of infrastructure.
- Stack: the deployed instance of a template.
- Stack set: a way to manage stacks across accounts or regions.
- Parameters: runtime inputs to a template.
- Outputs: values exported after creation.
- Resources: the AWS objects created by the stack.
Template Sections
AWSTemplateFormatVersionDescriptionParametersResourcesOutputs
Practical Notes
- Use parameters for values that differ between environments.
- Keep templates small and composable when possible.
- Treat stack outputs as the contract between infrastructure layers.