CloudFormation Flashcards
What is CloudFormation?
Manage, configure and provision AWS infrastructure as code
What formats can a CloudFormation document be in
YAML
JSON
Where is CloudFormation template uploaded
S3
Required part of CloudFormation Template
Resource section
resources you want AWS to create for you
What is the Transform section of CloudFormation code used for
reference additional code stored in S3 allowing for code reuse
or
SAM
Sections of CloudFormation Template
Parameters Conditions Resources mappings (custom mapping like Regio:AMI) Transform
What happens if there are problems with the deploy of a CloudFormation template?
Rollsback automatically to previous stack
If want CloudFormation template to regularly update to map latest AMI ID how can you do that efficiently?
Use CloudFormation with Systems Manager Parameter Store to retrieve latest AMI ID for template. Put these in Parameter section of template. Whenever you update EC2 instances call update-stack API in CloudFormation in CloudFormation Template
CloudFormation Nested Stack
allow re-use of CloudFormation code for common use cases
How to create a nested stack in CloudFormation
Type: AWS:CloudFormation:Stack
TemplateURL: (url to template)
What is cfn-init used for?
Install packages and start/stop services on EC2 instances,
Install packages, start/stop services or create files
How to create, update, and delete stacks across multiple aws accounts and regions w/ one operation?
CloudFormation StackSets