CloudFormation Flashcards
How do you use Fn::FindInMap?
!FindInMap [ MapName, TopLevelKey, SecondLevelKey ]
What values can Fn:Ref be used for, and what is returned?
Parameter - returns the value of that parameter
Resources - returns the physical ID of the resource
What does the Fn::GetAtt do?
Get the value of an attribute from a resource
What is Fn::ImportValue used for?
Import values that have been exported from other files
What does Fn:Join do?
Join values with a given delimiter
e.g., to get ‘a:b:c’ from [a,b,c] -> !Join [ “:”, [ a, b, c ] ]
What does Fn::Sub do?
Substitute variables from text
What are the conditional functions we can use?
Fn::And, Equals, If, Not and Or
When would you use a cross stack, and how would you do this?
When stacks have different lifecycles
- Use Outputs Export and Fn::ImportValue
- e.g., passing the VPC Id to other stacks.
When would you use a nested stack?
When components must be re-used
When would you use a nested stack?
When components must be re-used
- Re-use how to properly configure a load balancer
- The nested stack is only important to the parent stack
What is a StackSet?
A set of stacks which can be controlled from one location (i.e., can create, update or delete the stacks across multiple accounts and regions with a single operation)
What is CloudFormation Drift?
Manual configuration changes that are not recorded in the CloudFormation templates.
What section of the CloudFormation template is mandatory?
Resources