AWS FAQ: AWS CloudFormation
7. What is AWS CloudFormation and why use it?
AWS CloudFormation is an Infrastructure as Code (IaC) service that enables you to model and provision AWS resources using JSON or YAML templates.
πΊοΈ Step-by-Step Instructions:
- Create a template describing resources.
- Upload it to CloudFormation.
- Deploy the stack and monitor its progress.
π₯ Example Input:
Resources:
MyBucket:
Type: AWS::S3::Bucket
π Expected Output:
S3 bucket deployed and visible in the AWS console.
β Template Snippet:
{
"Resources": {
"MyInstance": {
"Type": "AWS::EC2::Instance",
"Properties": {
"InstanceType": "t2.micro",
"ImageId": "ami-0abcdef1234567890"
}
}
}
}
π Detailed Explanation:
- Stack Management: Rollbacks and updates in bulk.
- Drift Detection: Monitor configuration changes.
- Repeatability: Deploy identical environments.
π οΈ Use Cases:
- Consistent environments for Dev/Test/Prod.
- Rapid setup for disaster recovery.
- Templated microservice deployments.
