CloudFormation Physical and Logical Resources Flashcards
The “What” in a CloudFormation Template
Logical Resources
What CloudFormation templates are used to create
Stacks
Creates physical resources from the logical resources which can be updated or deleted
Stacks
If you delete a stack are the logical resources deleted?
Yes
If the logical resources are deleted in a CloudFormation Stack and the physical resources deleted?
Yes
Parameters that accept input from console/cli/api when a stack is created or updated
Template Parameters
Parameters that are made by AWS based on the environment when creating the stack which can be referenced
Pseudo Parameters
Function which allows you to reference a value from one logical resource or parameter in another one
!Ref & Fn::GetAtt
Function which allows you to join strings together or split them
Fn::Join & Fn::Split
Function which can be used to get a list of availability zones for a given AWS region
FN::GetAZs
Function which allows you to select one element from list of Availible AZs
Fn::Select
Function used to provision resources based on conditional checks
Fn:: IF, And, Equals, Not, Or
Function used to accept non-encoded text and outputs base64 encoded text that can be provided to the resource
Fn::Base64
Function that allows you to substitute things within text based on runtime information
Fn::Sub
Function used to automatically configure the network ranges subnets use within a ClouDFormation template
Fn:Cidr
Function used to retrieve any attribute associated with the resource
!GetAtt
Object within a template which maps keys to values allowing lookup
CloudFormation Mappings
Function which are used to retrieve a given amazon machine image ID
!FindInMap
declares output values that you can import into other stacks, return in response, or view on the AWS CloudFormation Console
Outputs
statements that define the circumstances under which entities are created or configured, evaluated based on predefined pseudo parameters or input parameter values that you specify when you create or update a stack
Conditions
attribute you can specify that the creation of a specific resource follows another and ensure that the resource is created only after the creation of the resource specified
DependsOn
can be used together to prevent the status if a resource from reaching create complete until AWS CloudFormation receives a specified number of success signals or the timeout period is exceeded
CreationPolicy, WaitConditions and cfn-signal
stacks that allow for a hierarchy of related templates to be combined to form a single product used to overcome the resource limit of one stack when everything created is lifecycle linked
Nested Stack
stacks that create modular templates which allow code to be reused
Nested Stack