Infrastructure Automation: AWS CloudFormation Flashcards
Need to review updates to a CloudFormation stack
before deploying them in production
Use change sets
Stack deployed and manual changes were made.
Need to capture changes and update template
Use drift detection and use output to update
template and redeploy the stack
Need to update new version of app on EC2 and ALB.
Must avoid DNS changes and be able to rollback
Update template with AutoScalingReplacingUpdate
policy and perform an update
Need to write a single template that can be deployed
across several environments / Region
Use parameters to enter custom values and use Ref
intrinsic function to reference the parameter
Tried to launch instance in a different region from a
working template and it fails
Probably due to incorrect AMI ID
CloudFormation stack created for first time and fails
with ROLLBACK_COMPLETE status
To continue administrator must relaunch the
template to create a new stack
Template for infrastructure in one region used to
deploy in another and fails
Template likely referenced an AMI that doesn’t exist
in the new region and/or services that don’t exist
CloudFormation stack fails and returns
UPDATE_ROLLBACK_FAILED
Fix the error that caused the rollback to fail and then
select “Continue update rollback” in the console
Need to deploy a single CloudFormation template across multiple accounts
Use StackSets
CloudFormation deploys stack with separate VPC for each app. Fails to deploy
May have reached the default limit for VPCs in the
account
Would like to manually address any issues with
CloudFormation stack creation
Set the OnFailure parameter to “DO_NOTHING”
CloudFormation fails with “The image id ‘[ami-
2a69aa47]’ does not exist”
Most likely the template is being run in a different
region where the AMI does not exist
When creating Stack a wait condition error is
experienced: ““received 0 signals out of the 1
expected from the EC2 instance”.”
Check instance has a route through NAT device and in
the cfn logs confirm that the cfn-signal command ran
successfully