CloudFormation Flashcards
What is CloudFormation
A declarative way of outlining your AWS Infrastructure, for any resources. (Most are supported)
What does CloudFormation do?
Eliminates the need for manual configuration, as everything is provisioned automatically through templates.
How can you reference a template in CloudFormation?
After uploading a template in S3.
How is a template edited?
It’s not. Re-upload a new version of the template.
What is deleted along with a stack?
Every single artifact that was created by CloudFormation.
Two ways to deploy CloudFormation templates?
- Manual
- Automated
Features:
- Editing templates in CloudFormation Designer or code editor
- Using the console to input parameters, etc…
Manual deployment
Features:
- Editing templates in a YAML file
- Using the AWS CLI (Command Line Interface) to deploy the templates, or using a Continuous Delivery (CD) tool
Automated deployment
What is the core of your CloudFormation template?
Resources
What are “Resources”?
Different AWS Components that will be created and configured.
Resources are….. and can…… each other.
declared, reference
How are resources created, updated, and deleted?
AWS does it.
What do “Parameters” do?
Provides inputs to AWS CloudFormation template.
Features:
- You want to reuse your templates across the company
- Some inputs can not be determined ahead of time
Parameteres
How can parameters help prevents errors in a template?
Types
What should a “parameter” be used?
When a resource configuration is likely to change.
What are “Mappings”?
Fixed variables within your CloudFormation template.
When should “mappings” be used?
When you know in advance all the values that can be taken.
When should “parameters” be used?
When the values are really user specific.
What are “Outputs”?
Declares optional outputs values that we can import into other stacks
What are “Conditions”?
They control the creation of resources or outputs based on a condition.
Each condition can reference..
Other condition, parameter value or mapping.
Different types of “Rollbacks”?
- Stack Creation Fails
- Stack Update Fails
What is a CloudFormation “Serve Role”?
IAM roles that allows CloudFormation create/update/delete stack resources.
How can you give users CRUD abilities to the stack resource even if they don’t have permissions?
Service role
What is “Deletion Policy”?
Allows control of what happens when the CloudFormation template is deleted/ resource is removed.
What is an extra safety measure to preserve and backup resource?
Deletion policy
Delete won’t work on an S3 bucket if the bucket is not empty?
True
What is a “Stack Policy”?
A JSON document that defines the update actions that are allowed on specific resources during Stack updates.
What are all resources in a Stack protected by default?
What a Stack Policy is set.