CloudFormation
💡 Definition
AWS CloudFormation is a service that helps you model and set up your Amazon Web Services resources so that you can spend less time managing those resources and more time focusing on your applications running in AWS. You create a template that describes all the AWS resources that you want (e.g., EC2 instances, RDS databases, VPC networks), and CloudFormation handles the provisioning and configuration.
🔑 Key Concepts
- Infrastructure as Code (IaC): You treat your infrastructure definitions like application code (version control, review).
- Templates: JSON or YAML files that describe your desired AWS resources.
- Stacks: A collection of AWS resources created and managed by a single CloudFormation template.
- Automated Provisioning: CloudFormation automatically creates, updates, and deletes resources defined in your template.
⚙️ How it Works
- Write Template: Define your AWS resources in a JSON or YAML template file.
- Upload Template: Upload the template to CloudFormation.
- Create Stack: CloudFormation reads the template and provisions the resources to create a stack.
- Manage: You can update or delete the entire stack through CloudFormation.
🎯 Use Cases
- Consistent Deployments: Ensure all environments (dev, test, prod) are identical.
- Environment Replication: Easily replicate entire application environments.
- Disaster Recovery: Quickly spinning up an entire infrastructure in another Region.
- Resource Management: Grouping and managing related resources as a single unit.
💰 Pricing Model
- Free: AWS CloudFormation itself is free. You only pay for the AWS resources (e.g., EC2, S3) created by your templates.
📝 Exam Tips (CLF-C02)
- CloudFormation is Infrastructure as Code.
- Uses JSON or YAML templates.
- Manages resources as a single unit (Stack).
- Key for automation, consistency, and repeatability.
See Also: * CodeDeploy * Systems Manager