Please enable JavaScript.
Coggle requires JavaScript to display documents.
CloudFormation (Core Features (Intrinsic Functions (Fn::Join (JSON), !Join…
CloudFormation
Core Feature
s
Intrinsic Functions
Fn::Join (JSON)
!Join (YAML)
!Ref (YAML)
Ref (JSON)
Fn::FindInMap (JSON)
!FindInMap
Fn::GetAtt (JSON)
!GetAtt (YAML)
Multiple Resources
need to be created in specific order
CloudFormation handles the correct order
Pseudo Parameters
predefined
AWS::AccountId
AWS::NotificationARNs
AWS::StackId
AWS::StackName
AWS::Region
similar to Environment Variables
Reference with Ref Intrinsic Function
Mappings
use input value to determine another value
use FinInMap
e.g. AMI-ImageID for given region
Input Parameters
input custom values
must be assigned a value at runtime
Default
values possible
attribute
Type
the only required
String
Number
List<Number>
CommaDelimitedList
AWS-specific types (AWS::EC2::Image::Id)
System Manager Parameter types
AllowedValues
to restrict
Output
get
access
to information about resources within a stack
e.g. public IP of EC2 instance
Results in AWS console section "Output"
Template
Anatomy
AWSTemplateFormatVersion
Description
Metadata
Parameters
Mappings
Conditions
Transform
Resources
the only required section :pencil2:
Output
Format
JSON
YAML
is a bueprint
execution creates a
stack
A set of related resources as a single unit
Change Sets
Update a Stack
can be a risky action :explode:
e.g. renaming could force an
deletion
and the creation of new
Change Set would inform us
Summary of proposed changes
see how the changes will impact running resources
Working with Change Sets
Create
submit a modified template
View
After creating
you can view proposed changes
Execute
updates the changes
on existing stack
Anatomy
Array of
Resource Change
Datatype
Action
LogicalResourceID & PhysicalResourceId
ResourceType
Replacement
Scope
Details
Problem to solve
Infrastructure as code
Configurations
Provisioning
Deployment
Custom scripts :fire:
Error prone
Point solutions
Difficult to change and maintain
rarely made truly reusable