CloudFormation Flashcards
This deck aims to help retain concepts related to the CloudFormation service.
Which AWS service enables you to model and provision AWS resources using templates written in YAML or JSON?
AWS CloudFormation
What is an AWS CloudFormation Logical Resource?
A resource defined in a CloudFormation Template
What is an AWS CloudFormation Physical Resource?
The actual resource created in an AWS account by a CloudFormation stack
Which AWS CloudFormation component specifies the resources to be created and their configurations?
CloudFormation Template
Can an AWS CloudFormation Template be reused?
Yes, it can be reused across multiple accounts and regions
What AWS CloudFormation component creates and manages physical resources based on logical resources defined in a template, ensuring synchronization between them?
CloudFormation Stack
What happens when logical resources in an AWS CloudFormation Template are updated?
The stack will be updated, and the corresponding physical resources will be modified to reflect the changes
What happens if an AWS CloudFormation Stack is deleted?
All associated physical resources will also be deleted, unless they are protected or retained
What AWS CloudFormation Template section is used to explicitly provide input data when a stack is created or updated to customize the resources being created?
Hint: Input data can be provided using console UI, CLI, or API
Parameters
What AWS CloudFormation Template component represents predefined variables that are automatically populated by AWS?
Pseudo Parameters
What properties can an AWS CloudFormation Template Parameter be configured with?
- Description: Provides details about the parameter
- Default: Specifies a value to use if no input is given
- AllowedValues: Defines a list of valid options for the parameter
- AllowedPattern: Specifies a regular expression pattern to validate the input
- MinValue/MinLength: Sets the smallest acceptable numeric value or string length
- MaxValue/MaxLength: Sets the largest acceptable numeric value or string length
- NoEcho: Hides the parameter value, useful for sensitive data
- Type: Specifies the parameter’s data type (e.g., String, Number, List, CommaDelimitedList)
What are the most common AWS CloudFormation Pseudo Parameters?
- AWS::Region: Represents the region where the stack is created
- AWS::AccountId: Represents the account ID where the stack is created
- AWS::StackName: Represents the name of the stack
- AWS::StackId: Represents the unique identifier of the stack
- AWS::NoValue: Removes a resource property
What are the main differences between AWS CloudFormation Template Parameters and Pseudo Parameters?
Template Parameters:
- Defined by humans when creating a template
- Require explicit input during stack creation or update
Pseudo Parameters:
- Predefined by AWS
- Automatically injected and do not require user input
Which AWS CloudFormation Template components provide functionality to dynamically produce values, apply conditionals, and control resource characteristics?
Intrinsic Functions
What AWS CloudFormation intrinsic function returns the Base64 representation of the input string?
Fn::Base64: valueToEncode
What AWS CloudFormation intrinsic function returns an array of CIDR address blocks?
Fn::Cidr:
- ipBlock
- count
- cidrBits
What AWS CloudFormation intrinsic functions are used to conditionally create stack resources?
Fn::Not
Fn::And
Fn::Or
Fn::If
Fn::Equals
What AWS CloudFormation intrinsic function returns the value corresponding to keys in a two-level map?
Fn::FindInMap: [ MapName, TopLevelKey, SecondLevelKey ]
What AWS CloudFormation intrinsic function takes a collection and a fragment, and applies the items in the collection to the identifier in the provided fragment?
'Fn::ForEach::UniqueLoopName':
- Identifier
- - Value1 # collection
- Value2
- 'OutputKey':
OutputValue
What AWS CloudFormation intrinsic function returns the value of an attribute from a resource in the template?
Fn::GetAtt: [ logicalNameOfResource, attributeName ]
What AWS CloudFormation intrinsic function returns an array that lists Availability Zones for a specified Region?
Fn::GetAZs: region
What AWS CloudFormation intrinsic function returns the value of an output exported by another stack?
Fn::ImportValue: sharedValueToImport
What AWS CloudFormation intrinsic function appends a set of values into a single value?
Fn::Join: [ delimiter, [ comma-delimited list of values ] ]
What AWS CloudFormation intrinsic function returns the number of elements within an array or an intrinsic function that returns an array?
Fn::Length : IntrinsicFunction