07-CloudFormation Basics Flashcards
What is CloudFormation?
A tool used to create, update, and delete infrastructure in a consistent and repeatable way using templates. It keeps the logical and physical resources in sync by adding, updating, or deleting resources as defined in the template.
What formats are used for CloudFormation templates?
YAML or JSON
What are the components of CloudFormation?
Resources, Stacks, Description, Template Format Version, Metadata, Parameters, Mappings, Conditions, and Outputs.
What parts of a CloudFormation template are mandatory?
Only the resource section is mandatory.
What is the Resource portion of a CloudFormation template?
Defines the infrastructure resources to be created, updated, or deleted.
What are logical resources in a template?
Representations of infrastructure components (e.g., AWS::EC2::Instance).
What purpose do logical resources provide when deploying a template?
The translate to the physical resources that are created.
What happens to a resource if it is removed from a template?
The corresponding physical resource is deleted when the updated template is deployed.
What are Stacks?
A collection of logical resources managed by CloudFormation? Stacks are created when deploying the template for the first time.
What is the Description of a template?
Optional text field that provides details about the template.
If a Description is used alongside a Template Format Version, which one goes first?
The Template Format Version and the Description must immediately follow.
What is a Template Format Version?
Specifies the version of the template structure.
What is the Metadata of a template?
Controls how a template is presented in the Console and is used to enhance the user experience, especially in larger templates.
What are Parameters in a template?
User inputs that can be promoted for when applying a template. Parameters can also have default values and created for valid entries.
What is an example of a Parameter?
instance size, AZ
NAME?
Optional section used to create lookup tables.
What is an example of a Mapping?
Mapping regions and instance types to specific AMIs based on the environment, such a test or production.
What are Conditions in a template?
Allows for conditional logic in a template, can be created based on parameters and used to control resource creation.
What is an example of a Condition?
Creating resources only in production environments if a parameter equals “prod”.
What are Outputs?
Return information after the stack creation or update, such as an instance ID or a WordPress URL.
Why are Outputs useful?
Useful to retrieving important information about the resources created.