CloudGuild · Blog · Cheat sheets · Lessons · Certifications
AWS CloudFormation — Infrastructure as Code Simplified
AWS CloudFormation automates the setup and management of AWS resources using code to ensure consistent and repeatable deployments.
What it is
- AWS CloudFormation is a service that enables you to define and provision AWS infrastructure using code (JSON or YAML).
- It allows you to create a template for your AWS resources, making them easily replicable.
When I reach for it
- Use CloudFormation when you need to manage infrastructure at scale, ensuring consistency across environments.
- Ideal for automating deployments and updates in a controlled, repeatable manner.
Key architectural decisions
- Choose between JSON and YAML for your templates based on readability and complexity.
- Use nested stacks for modularity and reusability of templates.
- Decide on parameters and outputs to enhance template flexibility and usability.
Gotchas & exam traps
- Be aware of the stack limits (maximum number of resources, nested stacks, etc.).
- Understand the difference between "Update" and "Replace" actions during stack updates.
- Watch out for resource dependencies that can lead to update failures.
The architect view
- CloudFormation embodies the principle of Infrastructure as Code, promoting version control and collaboration.
- Prioritize writing clean, modular templates to simplify management and reduce complexity.