AWS CloudFormation
AWS CloudFormation is a service that gives you an easy way to create a collection of related AWS and third-party resources, and provision and manage them in an orderly and predictable fashion. It allows you to model your entire infrastructure in a text file (JSON or YAML).
Key Features
- Infrastructure as Code (IaC): Define resources in a template file.
- Templates: JSON or YAML files describing the resources.
- Stacks: A collection of resources created from a template.
- Change Sets: Preview changes before applying them to a stack.
- Drift Detection: Detect if resources have been modified outside of CloudFormation.
Exam Tips
- "Infrastructure as Code": Answer is CloudFormation.
- "Templates (JSON/YAML)": Answer is CloudFormation.
- "Automated provisioning": CloudFormation handles this.
- "Drift detection": Feature to check if stack resources match the template.
Common Use Cases
- Replicating Infrastructure: Deploying the exact same environment in multiple regions/accounts.
- Disaster Recovery: Quickly re-launching infrastructure from templates.
- Version Control: Managing infrastructure changes via git (since templates are code).