Optional: troubleshooting, 50 production cases and 50 interview questions

AWS CloudFormation · 60 minutes · 8 modules
AWS CloudFormationAWS CLI v2Optional hour
Learning objectives
  • Work through concepts, commands and troubleshooting in all eight modules.
  • Review changesets and verify resource lifecycle behavior in a sandbox.
  • Explain deployment results using stack events, outputs and service evidence.

1-hour schedule

#TimeModuleCore contentLearning views
100–06 · 6 minTroubleshooting methodStart with identity, stack status, earliest failed event and resource-level evidence.Concepts, commands, lab, production and troubleshooting
206–13 · 7 minTemplate and validation failuresDiagnose malformed YAML, unsupported properties, missing parameters and transform errors.Concepts, commands, lab, production and troubleshooting
313–21 · 8 minAuthorization and PassRole failuresTrace caller, service-role, trust-policy and iam:PassRole denials.Concepts, commands, lab, production and troubleshooting
421–29 · 8 minCREATE_FAILED and rollbackUse stack events and service-side events to fix create failures safely.Concepts, commands, lab, production and troubleshooting
529–37 · 8 minUPDATE_ROLLBACK_FAILED recoveryRepair the cause, continue rollback and verify resource ownership.Concepts, commands, lab, production and troubleshooting
637–45 · 8 minTimeouts and stabilizationDiagnose missing signals, provider stabilization and dependency cycles.Concepts, commands, lab, production and troubleshooting
745–52 · 7 minDrift and unexpected replacementReconcile out-of-band edits and review replacement risk before retrying.Concepts, commands, lab, production and troubleshooting
852–60 · 8 min50 interview questions and mock reviewExplain trade-offs with evidence, limits, recovery steps and production examples.Concepts, commands, lab, production and troubleshooting

How to use this course

Each module includes concepts, a diagram, a walkthrough, commands, a lab, a production case, troubleshooting, a quiz, narration and official references. Progress is saved in this browser.

Lab requirements: AWS CLI v2, a sandbox account and least-privilege permissions. Verify account/Region before labs and clean up afterward.

Setup

Prepare AWS CLI v2, a sandbox account and deployment permissions. Verify identity and Region; do not run labs in a production account.

aws --version
aws sts get-caller-identity --profile sandbox
aws configure list --profile sandbox

Labs may create resources. Follow each lab's cleanup steps and verify stack status when finished.

Troubleshooting method

Hour 8 · 1 / 8

Core concepts

Start with identity, stack status, earliest failed event and resource-level evidence.

  • Check the resource reference for properties and update behavior.
  • Make the relationship between template, parameters, execution identity and target environment explicit.
  • Record an observable expected result and cleanup method.

Request path

Focus: Troubleshooting method
Template → Validate → Change set → Review → Execute → Troubleshooting method → Verify events

Keep reviewable inputs and results at each stage; a change set does not apply proposed changes until execution.

Deployment state sequence

  1. Identify the requirement: Troubleshooting method
  2. Validate the inputs and inspect the proposed resource action
  3. Execute in a sandbox and verify the resulting stack events

Commands and notes

aws cloudformation describe-stacks --stack-name app-prod

Confirm profile, account and Region first. Replace example names with sandbox resources.

Hands-on lab

Apply this module to a disposable sandbox stack. Record the input, command, expected CloudFormation event or result, and cleanup step. Verify the outcome before moving to the next module: Start with identity, stack status, earliest failed event and resource-level evidence.

  1. Run the command and save its output.
  2. Compare it with the expected result and record differences.
  3. Delete the lab stack and confirm there are no leftover resources.

Production case review

Production review: make this behavior explicit in the template and change review. Confirm ownership, blast radius, rollback or retention behavior, and the evidence an operator can use during an incident. Topic: Start with identity, stack status, earliest failed event and resource-level evidence.

Release gate Inspect replacements and deletions; confirm approval, backups and rollback ownership.

Troubleshooting path

If the operation fails, capture the stack status, logical resource ID and earliest failed event. Separate template, permission, quota, service stabilization and dependency causes; fix the source, then create a fresh change set before retrying. Topic: Start with identity, stack status, earliest failed event and resource-level evidence.

aws cloudformation describe-stack-events --stack-name app-dev --region us-east-1

Narration script

Start with identity, stack status, earliest failed event and resource-level evidence.

The key is to record the desired state in a template, execute it through a stack, and use event evidence to verify the result.

Official learning resources

Work through the AWS User Guide and CloudFormation Workshop. This lesson emphasizes reviewable text-based labs.

AWS CloudFormation User Guide ↗

Template and validation failures

Hour 8 · 2 / 8

Core concepts

Diagnose malformed YAML, unsupported properties, missing parameters and transform errors.

  • Check the resource reference for properties and update behavior.
  • Make the relationship between template, parameters, execution identity and target environment explicit.
  • Record an observable expected result and cleanup method.

Request path

Focus: Template and validation failures
Template → Validate → Change set → Review → Execute → Template and validation failures → Verify events

Keep reviewable inputs and results at each stage; a change set does not apply proposed changes until execution.

Deployment state sequence

  1. Identify the requirement: Template and validation failures
  2. Validate the inputs and inspect the proposed resource action
  3. Execute in a sandbox and verify the resulting stack events

Commands and notes

aws cloudformation describe-stack-events --stack-name app-prod --max-items 50

Confirm profile, account and Region first. Replace example names with sandbox resources.

Hands-on lab

Apply this module to a disposable sandbox stack. Record the input, command, expected CloudFormation event or result, and cleanup step. Verify the outcome before moving to the next module: Diagnose malformed YAML, unsupported properties, missing parameters and transform errors.

  1. Run the command and save its output.
  2. Compare it with the expected result and record differences.
  3. Delete the lab stack and confirm there are no leftover resources.

Production case review

Production review: make this behavior explicit in the template and change review. Confirm ownership, blast radius, rollback or retention behavior, and the evidence an operator can use during an incident. Topic: Diagnose malformed YAML, unsupported properties, missing parameters and transform errors.

Release gate Inspect replacements and deletions; confirm approval, backups and rollback ownership.

Troubleshooting path

If the operation fails, capture the stack status, logical resource ID and earliest failed event. Separate template, permission, quota, service stabilization and dependency causes; fix the source, then create a fresh change set before retrying. Topic: Diagnose malformed YAML, unsupported properties, missing parameters and transform errors.

aws cloudformation describe-stack-events --stack-name app-dev --region us-east-1

Narration script

Diagnose malformed YAML, unsupported properties, missing parameters and transform errors.

The key is to record the desired state in a template, execute it through a stack, and use event evidence to verify the result.

Official learning resources

Work through the AWS User Guide and CloudFormation Workshop. This lesson emphasizes reviewable text-based labs.

AWS CloudFormation User Guide ↗

Authorization and PassRole failures

Hour 8 · 3 / 8

Core concepts

Trace caller, service-role, trust-policy and iam:PassRole denials.

  • Check the resource reference for properties and update behavior.
  • Make the relationship between template, parameters, execution identity and target environment explicit.
  • Record an observable expected result and cleanup method.

Request path

Focus: Authorization and PassRole failures
Template → Validate → Change set → Review → Execute → Authorization and PassRole failures → Verify events

Keep reviewable inputs and results at each stage; a change set does not apply proposed changes until execution.

Deployment state sequence

  1. Identify the requirement: Authorization and PassRole failures
  2. Validate the inputs and inspect the proposed resource action
  3. Execute in a sandbox and verify the resulting stack events

Commands and notes

aws iam simulate-principal-policy --policy-source-arn arn:aws:iam::123456789012:role/CfnDeploy --action-names cloudformation:UpdateStack

Confirm profile, account and Region first. Replace example names with sandbox resources.

Hands-on lab

Apply this module to a disposable sandbox stack. Record the input, command, expected CloudFormation event or result, and cleanup step. Verify the outcome before moving to the next module: Trace caller, service-role, trust-policy and iam:PassRole denials.

  1. Run the command and save its output.
  2. Compare it with the expected result and record differences.
  3. Delete the lab stack and confirm there are no leftover resources.

Production case review

Production review: make this behavior explicit in the template and change review. Confirm ownership, blast radius, rollback or retention behavior, and the evidence an operator can use during an incident. Topic: Trace caller, service-role, trust-policy and iam:PassRole denials.

Release gate Inspect replacements and deletions; confirm approval, backups and rollback ownership.

Troubleshooting path

If the operation fails, capture the stack status, logical resource ID and earliest failed event. Separate template, permission, quota, service stabilization and dependency causes; fix the source, then create a fresh change set before retrying. Topic: Trace caller, service-role, trust-policy and iam:PassRole denials.

aws cloudformation describe-stack-events --stack-name app-dev --region us-east-1

Narration script

Trace caller, service-role, trust-policy and iam:PassRole denials.

The key is to record the desired state in a template, execute it through a stack, and use event evidence to verify the result.

Official learning resources

Work through the AWS User Guide and CloudFormation Workshop. This lesson emphasizes reviewable text-based labs.

AWS CloudFormation User Guide ↗

CREATE_FAILED and rollback

Hour 8 · 4 / 8

Core concepts

Use stack events and service-side events to fix create failures safely.

  • Check the resource reference for properties and update behavior.
  • Make the relationship between template, parameters, execution identity and target environment explicit.
  • Record an observable expected result and cleanup method.

Request path

Focus: CREATE_FAILED and rollback
Template → Validate → Change set → Review → Execute → CREATE_FAILED and rollback → Verify events

Keep reviewable inputs and results at each stage; a change set does not apply proposed changes until execution.

Deployment state sequence

  1. Identify the requirement: CREATE_FAILED and rollback
  2. Validate the inputs and inspect the proposed resource action
  3. Execute in a sandbox and verify the resulting stack events

Commands and notes

aws cloudformation describe-stack-events --stack-name app-prod --max-items 50

Confirm profile, account and Region first. Replace example names with sandbox resources.

Hands-on lab

Apply this module to a disposable sandbox stack. Record the input, command, expected CloudFormation event or result, and cleanup step. Verify the outcome before moving to the next module: Use stack events and service-side events to fix create failures safely.

  1. Run the command and save its output.
  2. Compare it with the expected result and record differences.
  3. Delete the lab stack and confirm there are no leftover resources.

Production case review

Production review: make this behavior explicit in the template and change review. Confirm ownership, blast radius, rollback or retention behavior, and the evidence an operator can use during an incident. Topic: Use stack events and service-side events to fix create failures safely.

Release gate Inspect replacements and deletions; confirm approval, backups and rollback ownership.

Troubleshooting path

If the operation fails, capture the stack status, logical resource ID and earliest failed event. Separate template, permission, quota, service stabilization and dependency causes; fix the source, then create a fresh change set before retrying. Topic: Use stack events and service-side events to fix create failures safely.

aws cloudformation describe-stack-events --stack-name app-dev --region us-east-1

Narration script

Use stack events and service-side events to fix create failures safely.

The key is to record the desired state in a template, execute it through a stack, and use event evidence to verify the result.

Official learning resources

Work through the AWS User Guide and CloudFormation Workshop. This lesson emphasizes reviewable text-based labs.

AWS CloudFormation User Guide ↗

UPDATE_ROLLBACK_FAILED recovery

Hour 8 · 5 / 8

Core concepts

Repair the cause, continue rollback and verify resource ownership.

  • Check the resource reference for properties and update behavior.
  • Make the relationship between template, parameters, execution identity and target environment explicit.
  • Record an observable expected result and cleanup method.

Request path

Focus: UPDATE_ROLLBACK_FAILED recovery
Template → Validate → Change set → Review → Execute → UPDATE_ROLLBACK_FAILED recovery → Verify events

Keep reviewable inputs and results at each stage; a change set does not apply proposed changes until execution.

Deployment state sequence

  1. Identify the requirement: UPDATE_ROLLBACK_FAILED recovery
  2. Validate the inputs and inspect the proposed resource action
  3. Execute in a sandbox and verify the resulting stack events

Commands and notes

aws cloudformation continue-update-rollback --stack-name app-prod

Confirm profile, account and Region first. Replace example names with sandbox resources.

Hands-on lab

Apply this module to a disposable sandbox stack. Record the input, command, expected CloudFormation event or result, and cleanup step. Verify the outcome before moving to the next module: Repair the cause, continue rollback and verify resource ownership.

  1. Run the command and save its output.
  2. Compare it with the expected result and record differences.
  3. Delete the lab stack and confirm there are no leftover resources.

Production case review

Production review: make this behavior explicit in the template and change review. Confirm ownership, blast radius, rollback or retention behavior, and the evidence an operator can use during an incident. Topic: Repair the cause, continue rollback and verify resource ownership.

Release gate Inspect replacements and deletions; confirm approval, backups and rollback ownership.

Troubleshooting path

If the operation fails, capture the stack status, logical resource ID and earliest failed event. Separate template, permission, quota, service stabilization and dependency causes; fix the source, then create a fresh change set before retrying. Topic: Repair the cause, continue rollback and verify resource ownership.

aws cloudformation describe-stack-events --stack-name app-dev --region us-east-1

Narration script

Repair the cause, continue rollback and verify resource ownership.

The key is to record the desired state in a template, execute it through a stack, and use event evidence to verify the result.

Official learning resources

Work through the AWS User Guide and CloudFormation Workshop. This lesson emphasizes reviewable text-based labs.

AWS CloudFormation User Guide ↗

Timeouts and stabilization

Hour 8 · 6 / 8

Core concepts

Diagnose missing signals, provider stabilization and dependency cycles.

  • Check the resource reference for properties and update behavior.
  • Make the relationship between template, parameters, execution identity and target environment explicit.
  • Record an observable expected result and cleanup method.

Request path

Focus: Timeouts and stabilization
Template → Validate → Change set → Review → Execute → Timeouts and stabilization → Verify events

Keep reviewable inputs and results at each stage; a change set does not apply proposed changes until execution.

Deployment state sequence

  1. Identify the requirement: Timeouts and stabilization
  2. Validate the inputs and inspect the proposed resource action
  3. Execute in a sandbox and verify the resulting stack events

Commands and notes

aws cloudformation describe-stacks --stack-name app-prod --query Stacks[0].StackStatus

Confirm profile, account and Region first. Replace example names with sandbox resources.

Hands-on lab

Apply this module to a disposable sandbox stack. Record the input, command, expected CloudFormation event or result, and cleanup step. Verify the outcome before moving to the next module: Diagnose missing signals, provider stabilization and dependency cycles.

  1. Run the command and save its output.
  2. Compare it with the expected result and record differences.
  3. Delete the lab stack and confirm there are no leftover resources.

Production case review

Production review: make this behavior explicit in the template and change review. Confirm ownership, blast radius, rollback or retention behavior, and the evidence an operator can use during an incident. Topic: Diagnose missing signals, provider stabilization and dependency cycles.

Release gate Inspect replacements and deletions; confirm approval, backups and rollback ownership.

Troubleshooting path

If the operation fails, capture the stack status, logical resource ID and earliest failed event. Separate template, permission, quota, service stabilization and dependency causes; fix the source, then create a fresh change set before retrying. Topic: Diagnose missing signals, provider stabilization and dependency cycles.

aws cloudformation describe-stack-events --stack-name app-dev --region us-east-1

Narration script

Diagnose missing signals, provider stabilization and dependency cycles.

The key is to record the desired state in a template, execute it through a stack, and use event evidence to verify the result.

Official learning resources

Work through the AWS User Guide and CloudFormation Workshop. This lesson emphasizes reviewable text-based labs.

AWS CloudFormation User Guide ↗

Drift and unexpected replacement

Hour 8 · 7 / 8

Core concepts

Reconcile out-of-band edits and review replacement risk before retrying.

  • Check the resource reference for properties and update behavior.
  • Make the relationship between template, parameters, execution identity and target environment explicit.
  • Record an observable expected result and cleanup method.

Request path

Focus: Drift and unexpected replacement
Template → Validate → Change set → Review → Execute → Drift and unexpected replacement → Verify events

Keep reviewable inputs and results at each stage; a change set does not apply proposed changes until execution.

Deployment state sequence

  1. Identify the requirement: Drift and unexpected replacement
  2. Validate the inputs and inspect the proposed resource action
  3. Execute in a sandbox and verify the resulting stack events

Commands and notes

aws cloudformation detect-stack-drift --stack-name app-prod

Confirm profile, account and Region first. Replace example names with sandbox resources.

Hands-on lab

Apply this module to a disposable sandbox stack. Record the input, command, expected CloudFormation event or result, and cleanup step. Verify the outcome before moving to the next module: Reconcile out-of-band edits and review replacement risk before retrying.

  1. Run the command and save its output.
  2. Compare it with the expected result and record differences.
  3. Delete the lab stack and confirm there are no leftover resources.

Production case review

Production review: make this behavior explicit in the template and change review. Confirm ownership, blast radius, rollback or retention behavior, and the evidence an operator can use during an incident. Topic: Reconcile out-of-band edits and review replacement risk before retrying.

Release gate Inspect replacements and deletions; confirm approval, backups and rollback ownership.

Troubleshooting path

If the operation fails, capture the stack status, logical resource ID and earliest failed event. Separate template, permission, quota, service stabilization and dependency causes; fix the source, then create a fresh change set before retrying. Topic: Reconcile out-of-band edits and review replacement risk before retrying.

aws cloudformation describe-stack-events --stack-name app-dev --region us-east-1

Narration script

Reconcile out-of-band edits and review replacement risk before retrying.

The key is to record the desired state in a template, execute it through a stack, and use event evidence to verify the result.

Official learning resources

Work through the AWS User Guide and CloudFormation Workshop. This lesson emphasizes reviewable text-based labs.

AWS CloudFormation User Guide ↗

50 interview questions and mock review

Hour 8 · 8 / 8

Core concepts

Explain trade-offs with evidence, limits, recovery steps and production examples.

  • Check the resource reference for properties and update behavior.
  • Make the relationship between template, parameters, execution identity and target environment explicit.
  • Record an observable expected result and cleanup method.

Request path

Focus: 50 interview questions and mock review
Template → Validate → Change set → Review → Execute → 50 interview questions and mock review → Verify events

Keep reviewable inputs and results at each stage; a change set does not apply proposed changes until execution.

Deployment state sequence

  1. Identify the requirement: 50 interview questions and mock review
  2. Validate the inputs and inspect the proposed resource action
  3. Execute in a sandbox and verify the resulting stack events

Commands and notes

aws cloudformation describe-stack-resource-drifts --stack-name app-prod

Confirm profile, account and Region first. Replace example names with sandbox resources.

Hands-on lab

Apply this module to a disposable sandbox stack. Record the input, command, expected CloudFormation event or result, and cleanup step. Verify the outcome before moving to the next module: Explain trade-offs with evidence, limits, recovery steps and production examples.

  1. Run the command and save its output.
  2. Compare it with the expected result and record differences.
  3. Delete the lab stack and confirm there are no leftover resources.

Production case review

Production review: make this behavior explicit in the template and change review. Confirm ownership, blast radius, rollback or retention behavior, and the evidence an operator can use during an incident. Topic: Explain trade-offs with evidence, limits, recovery steps and production examples.

Release gate Inspect replacements and deletions; confirm approval, backups and rollback ownership.

Troubleshooting path

If the operation fails, capture the stack status, logical resource ID and earliest failed event. Separate template, permission, quota, service stabilization and dependency causes; fix the source, then create a fresh change set before retrying. Topic: Explain trade-offs with evidence, limits, recovery steps and production examples.

aws cloudformation describe-stack-events --stack-name app-dev --region us-east-1

Narration script

Explain trade-offs with evidence, limits, recovery steps and production examples.

The key is to record the desired state in a template, execute it through a stack, and use event evidence to verify the result.

Official learning resources

Work through the AWS User Guide and CloudFormation Workshop. This lesson emphasizes reviewable text-based labs.

AWS CloudFormation User Guide ↗

50 production cases + 50 interview questions

Review symptoms, causes and responses. Expand each interview question for a model answer.

A · Production failure cases

#01 · YAML parser rejects a colon in an unquoted description

Root cause: The YAML, schema or transform is malformed or unsupported.

Response and prevention: Check the exact line and resource type in the template reference; correct the source and run cfn-lint plus validate-template before creating a new change set.

#02 · Resource property name is misspelled

Root cause: The YAML, schema or transform is malformed or unsupported.

Response and prevention: Check the exact line and resource type in the template reference; correct the source and run cfn-lint plus validate-template before creating a new change set.

#03 · Boolean value is supplied as a quoted string

Root cause: The YAML, schema or transform is malformed or unsupported.

Response and prevention: Check the exact line and resource type in the template reference; correct the source and run cfn-lint plus validate-template before creating a new change set.

#04 · Template uses a property from another resource type

Root cause: The YAML, schema or transform is malformed or unsupported.

Response and prevention: Check the exact line and resource type in the template reference; correct the source and run cfn-lint plus validate-template before creating a new change set.

#05 · Transform declaration is missing or malformed

Root cause: The YAML, schema or transform is malformed or unsupported.

Response and prevention: Check the exact line and resource type in the template reference; correct the source and run cfn-lint plus validate-template before creating a new change set.

#06 · CreateStack is denied before any resource event appears

Root cause: The caller, service role, trust policy or permission boundary denies the required action.

Response and prevention: Inspect the caller policy, service-role policy, trust relationship, permissions boundary and iam:PassRole. Simulate or narrowly reproduce the denied action; grant only the required resource-scoped permission.

#07 · CloudFormation cannot pass the configured execution role

Root cause: The caller, service role, trust policy or permission boundary denies the required action.

Response and prevention: Inspect the caller policy, service-role policy, trust relationship, permissions boundary and iam:PassRole. Simulate or narrowly reproduce the denied action; grant only the required resource-scoped permission.

#08 · A service role trusts the wrong principal

Root cause: The caller, service role, trust policy or permission boundary denies the required action.

Response and prevention: Inspect the caller policy, service-role policy, trust relationship, permissions boundary and iam:PassRole. Simulate or narrowly reproduce the denied action; grant only the required resource-scoped permission.

#09 · A permission boundary blocks an otherwise allowed action

Root cause: The caller, service role, trust policy or permission boundary denies the required action.

Response and prevention: Inspect the caller policy, service-role policy, trust relationship, permissions boundary and iam:PassRole. Simulate or narrowly reproduce the denied action; grant only the required resource-scoped permission.

#10 · The template creates IAM resources without capability acknowledgement

Root cause: The caller, service role, trust policy or permission boundary denies the required action.

Response and prevention: Inspect the caller policy, service-role policy, trust relationship, permissions boundary and iam:PassRole. Simulate or narrowly reproduce the denied action; grant only the required resource-scoped permission.

#11 · A required parameter was omitted from an update

Root cause: An input is missing, invalid or resolves to a different value type than the resource expects.

Response and prevention: Compare parameter names, types and resolved values with the template; inspect Ref/GetAtt return types and pseudo parameters. Validate inputs at the boundary and never place secrets in outputs.

#12 · AllowedValues rejects the pipeline value

Root cause: An input is missing, invalid or resolves to a different value type than the resource expects.

Response and prevention: Compare parameter names, types and resolved values with the template; inspect Ref/GetAtt return types and pseudo parameters. Validate inputs at the boundary and never place secrets in outputs.

#13 · Fn::Sub references an undefined variable

Root cause: An input is missing, invalid or resolves to a different value type than the resource expects.

Response and prevention: Compare parameter names, types and resolved values with the template; inspect Ref/GetAtt return types and pseudo parameters. Validate inputs at the boundary and never place secrets in outputs.

#14 · A resource expects an ARN but receives a name

Root cause: An input is missing, invalid or resolves to a different value type than the resource expects.

Response and prevention: Compare parameter names, types and resolved values with the template; inspect Ref/GetAtt return types and pseudo parameters. Validate inputs at the boundary and never place secrets in outputs.

#15 · A secret appears in an output or deployment log

Root cause: An input is missing, invalid or resolves to a different value type than the resource expects.

Response and prevention: Compare parameter names, types and resolved values with the template; inspect Ref/GetAtt return types and pseudo parameters. Validate inputs at the boundary and never place secrets in outputs.

#16 · CloudFormation reports a circular dependency

Root cause: The dependency graph is incomplete, circular or blocked by an active export consumer.

Response and prevention: Draw the resource/stack dependency graph. Remove circular references, deploy producers before consumers and do not remove an export until every importing stack has migrated.

#17 · An export cannot be deleted because it is in use

Root cause: The dependency graph is incomplete, circular or blocked by an active export consumer.

Response and prevention: Draw the resource/stack dependency graph. Remove circular references, deploy producers before consumers and do not remove an export until every importing stack has migrated.

#18 · A cross-stack value is unavailable in another Region

Root cause: The dependency graph is incomplete, circular or blocked by an active export consumer.

Response and prevention: Draw the resource/stack dependency graph. Remove circular references, deploy producers before consumers and do not remove an export until every importing stack has migrated.

#19 · A resource starts before an external prerequisite is ready

Root cause: The dependency graph is incomplete, circular or blocked by an active export consumer.

Response and prevention: Draw the resource/stack dependency graph. Remove circular references, deploy producers before consumers and do not remove an export until every importing stack has migrated.

#20 · DependsOn creates a deployment cycle

Root cause: The dependency graph is incomplete, circular or blocked by an active export consumer.

Response and prevention: Draw the resource/stack dependency graph. Remove circular references, deploy producers before consumers and do not remove an export until every importing stack has migrated.

#21 · A database endpoint changes during an update

Root cause: The proposed update changes physical identity or violates the resource lifecycle policy.

Response and prevention: Inspect the change set and resource update behavior. Confirm backup, retention and replacement strategy with the data owner. Prefer explicit DeletionPolicy and UpdateReplacePolicy for stateful resources.

#22 · Stack deletion is blocked by a non-empty bucket

Root cause: The proposed update changes physical identity or violates the resource lifecycle policy.

Response and prevention: Inspect the change set and resource update behavior. Confirm backup, retention and replacement strategy with the data owner. Prefer explicit DeletionPolicy and UpdateReplacePolicy for stateful resources.

#23 · A Retain policy leaves an untracked resource behind

Root cause: The proposed update changes physical identity or violates the resource lifecycle policy.

Response and prevention: Inspect the change set and resource update behavior. Confirm backup, retention and replacement strategy with the data owner. Prefer explicit DeletionPolicy and UpdateReplacePolicy for stateful resources.

#24 · Replacement would interrupt a stateful workload

Root cause: The proposed update changes physical identity or violates the resource lifecycle policy.

Response and prevention: Inspect the change set and resource update behavior. Confirm backup, retention and replacement strategy with the data owner. Prefer explicit DeletionPolicy and UpdateReplacePolicy for stateful resources.

#25 · An old physical resource is deleted after replacement

Root cause: The proposed update changes physical identity or violates the resource lifecycle policy.

Response and prevention: Inspect the change set and resource update behavior. Confirm backup, retention and replacement strategy with the data owner. Prefer explicit DeletionPolicy and UpdateReplacePolicy for stateful resources.

#26 · Stack enters UPDATE_ROLLBACK_FAILED

Root cause: The original failure or out-of-band change prevents CloudFormation from restoring the prior state.

Response and prevention: Read the first failed event, fix its underlying cause and use the documented continue-update-rollback workflow when needed. Skip a resource only after understanding its state and recording a reconciliation plan.

#27 · Rollback fails because a resource was manually deleted

Root cause: The original failure or out-of-band change prevents CloudFormation from restoring the prior state.

Response and prevention: Read the first failed event, fix its underlying cause and use the documented continue-update-rollback workflow when needed. Skip a resource only after understanding its state and recording a reconciliation plan.

#28 · A retained resource causes a later name collision

Root cause: The original failure or out-of-band change prevents CloudFormation from restoring the prior state.

Response and prevention: Read the first failed event, fix its underlying cause and use the documented continue-update-rollback workflow when needed. Skip a resource only after understanding its state and recording a reconciliation plan.

#29 · Operator wants to skip a failed resource during rollback

Root cause: The original failure or out-of-band change prevents CloudFormation from restoring the prior state.

Response and prevention: Read the first failed event, fix its underlying cause and use the documented continue-update-rollback workflow when needed. Skip a resource only after understanding its state and recording a reconciliation plan.

#30 · Rollback is disabled and the stack contains partial resources

Root cause: The original failure or out-of-band change prevents CloudFormation from restoring the prior state.

Response and prevention: Read the first failed event, fix its underlying cause and use the documented continue-update-rollback workflow when needed. Skip a resource only after understanding its state and recording a reconciliation plan.

#31 · Resource creation fails with a service quota error

Root cause: The target service rejects the request because of quota, Region, naming or stabilization constraints.

Response and prevention: Check the underlying service event, quota, Region availability and resource-specific constraints. Request quota increases early; use unique names and explicit supported properties.

#32 · A globally unique bucket name is already taken

Root cause: The target service rejects the request because of quota, Region, naming or stabilization constraints.

Response and prevention: Check the underlying service event, quota, Region availability and resource-specific constraints. Request quota increases early; use unique names and explicit supported properties.

#33 · The resource type is unavailable in the target Region

Root cause: The target service rejects the request because of quota, Region, naming or stabilization constraints.

Response and prevention: Check the underlying service event, quota, Region availability and resource-specific constraints. Request quota increases early; use unique names and explicit supported properties.

#34 · A property value violates a service-specific constraint

Root cause: The target service rejects the request because of quota, Region, naming or stabilization constraints.

Response and prevention: Check the underlying service event, quota, Region availability and resource-specific constraints. Request quota increases early; use unique names and explicit supported properties.

#35 · Resource remains IN_PROGRESS while the provider stabilizes

Root cause: The target service rejects the request because of quota, Region, naming or stabilization constraints.

Response and prevention: Check the underlying service event, quota, Region availability and resource-specific constraints. Request quota increases early; use unique names and explicit supported properties.

#36 · Nested stack cannot read its template from S3

Root cause: A child artifact is unreachable or the import declaration does not match the live resource.

Response and prevention: Inspect child stack events and template URL access. Confirm the resource type supports import and the import template matches live configuration and identifiers.

#37 · Parent update fails after a child parameter was renamed

Root cause: A child artifact is unreachable or the import declaration does not match the live resource.

Response and prevention: Inspect child stack events and template URL access. Confirm the resource type supports import and the import template matches live configuration and identifiers.

#38 · Import fails because the identifier is wrong

Root cause: A child artifact is unreachable or the import declaration does not match the live resource.

Response and prevention: Inspect child stack events and template URL access. Confirm the resource type supports import and the import template matches live configuration and identifiers.

#39 · Import template differs from the live resource

Root cause: A child artifact is unreachable or the import declaration does not match the live resource.

Response and prevention: Inspect child stack events and template URL access. Confirm the resource type supports import and the import template matches live configuration and identifiers.

#40 · Imported resource lacks the required deletion policy

Root cause: A child artifact is unreachable or the import declaration does not match the live resource.

Response and prevention: Inspect child stack events and template URL access. Confirm the resource type supports import and the import template matches live configuration and identifiers.

#41 · Manual console change is overwritten by the next update

Root cause: Live configuration differs from tracked template properties, or drift coverage is incomplete.

Response and prevention: Run drift detection and inspect resource-level results; remember only supported, explicitly set properties are compared. Decide whether code or live state is authoritative, reconcile, then detect again.

#42 · Drift detection reports NOT_CHECKED for a property

Root cause: Live configuration differs from tracked template properties, or drift coverage is incomplete.

Response and prevention: Run drift detection and inspect resource-level results; remember only supported, explicitly set properties are compared. Decide whether code or live state is authoritative, reconcile, then detect again.

#43 · An omitted default property is not reported as drift

Root cause: Live configuration differs from tracked template properties, or drift coverage is incomplete.

Response and prevention: Run drift detection and inspect resource-level results; remember only supported, explicitly set properties are compared. Decide whether code or live state is authoritative, reconcile, then detect again.

#44 · Change set proposes replacement after an unnoticed manual edit

Root cause: Live configuration differs from tracked template properties, or drift coverage is incomplete.

Response and prevention: Run drift detection and inspect resource-level results; remember only supported, explicitly set properties are compared. Decide whether code or live state is authoritative, reconcile, then detect again.

#45 · A nested stack does not appear in parent drift results

Root cause: Live configuration differs from tracked template properties, or drift coverage is incomplete.

Response and prevention: Run drift detection and inspect resource-level results; remember only supported, explicitly set properties are compared. Decide whether code or live state is authoritative, reconcile, then detect again.

#46 · CI works locally but the OIDC role trust rejects the workflow

Root cause: The pipeline identity, artifact, target configuration or rollout limits do not match the approved deployment.

Response and prevention: Verify the exact artifact, role trust claims, target account/Region and StackSet operation status. Roll out to a canary, inspect failed instances and pause before widening the deployment.

#47 · Pipeline deploys a different artifact than the reviewed commit

Root cause: The pipeline identity, artifact, target configuration or rollout limits do not match the approved deployment.

Response and prevention: Verify the exact artifact, role trust claims, target account/Region and StackSet operation status. Roll out to a canary, inspect failed instances and pause before widening the deployment.

#48 · StackSet instances fail in only one target account

Root cause: The pipeline identity, artifact, target configuration or rollout limits do not match the approved deployment.

Response and prevention: Verify the exact artifact, role trust claims, target account/Region and StackSet operation status. Roll out to a canary, inspect failed instances and pause before widening the deployment.

#49 · A target Region is disabled or unavailable

Root cause: The pipeline identity, artifact, target configuration or rollout limits do not match the approved deployment.

Response and prevention: Verify the exact artifact, role trust claims, target account/Region and StackSet operation status. Roll out to a canary, inspect failed instances and pause before widening the deployment.

#50 · High concurrency exceeds service capacity and creates failures

Root cause: The pipeline identity, artifact, target configuration or rollout limits do not match the approved deployment.

Response and prevention: Verify the exact artifact, role trust claims, target account/Region and StackSet operation status. Roll out to a canary, inspect failed instances and pause before widening the deployment.

B · Interview questions and model answers

Q01. What is CloudFormation?

Model answer: A managed IaC service that provisions and updates AWS resources from declarative templates.

Q02. Template vs stack?

Model answer: A template is the desired-state blueprint; a stack is a regional managed deployment made from it.

Q03. What is a logical ID?

Model answer: The unique key for a resource declaration inside one template.

Q04. What is a physical ID?

Model answer: The identifier assigned to or derived for the actual AWS resource.

Q05. What does Ref return for a parameter?

Model answer: The resolved parameter value supplied to the stack operation.

Q06. How does Ref behave for a resource?

Model answer: It returns the resource-specific reference value documented for that type.

Q07. When use Fn::GetAtt?

Model answer: When the template needs a documented attribute such as an endpoint or ARN.

Q08. What does Fn::Sub do?

Model answer: It substitutes variables and pseudo parameters into a string.

Q09. How are implicit dependencies created?

Model answer: References such as Ref, GetAtt and Sub let CloudFormation order resources.

Q10. When use DependsOn?

Model answer: For a genuine ordering requirement not represented by a resource reference.

Q11. What is a parameter constraint?

Model answer: A validation rule such as Type, AllowedValues or AllowedPattern applied to input.

Q12. Is NoEcho a secrets manager?

Model answer: No. It masks some displays but does not secure every place a value may appear.

Q13. What are mappings for?

Model answer: Fixed lookup tables evaluated with FindInMap, often for static environment data.

Q14. What are conditions for?

Model answer: To conditionally create resources or properties based on template inputs.

Q15. Outputs vs exports?

Model answer: Outputs report stack values; exports make selected values importable by another stack.

Q16. What is a change set?

Model answer: A preview of proposed resource actions that applies nothing until executed.

Q17. Does a change set guarantee success?

Model answer: No. Service runtime, permission, quota and stabilization failures can still occur.

Q18. What does replacement mean?

Model answer: CloudFormation creates a new physical resource and then handles the old one per policy.

Q19. What does DeletionPolicy Retain do?

Model answer: It leaves the resource when the stack or resource is removed from management.

Q20. How does UpdateReplacePolicy differ?

Model answer: It governs the old physical resource when an update replaces it.

Q21. What is drift detection?

Model answer: A comparison of supported, explicitly specified template properties with live state.

Q22. Does drift detection repair drift?

Model answer: No. It reports differences; operators reconcile code and live configuration.

Q23. Are all properties checked for drift?

Model answer: No. Coverage depends on resource support and explicitly set properties.

Q24. What is a stack policy?

Model answer: An update guard that can deny updates to selected logical resources.

Q25. What does termination protection do?

Model answer: It prevents stack deletion until protection is disabled.

Q26. What are nested stacks for?

Model answer: They decompose large templates into reusable child templates with explicit interfaces.

Q27. What constraint applies to Fn::ImportValue?

Model answer: Exports and imports are scoped to the same account and Region.

Q28. What is resource import?

Model answer: A workflow to bring a supported existing resource under stack management without recreating it.

Q29. Why set DeletionPolicy for import?

Model answer: Import requires a deletion policy and forces the owner to define future lifecycle behavior.

Q30. What is a CloudFormation service role?

Model answer: A role CloudFormation assumes to perform stack resource operations.

Q31. Why is iam:PassRole sensitive?

Model answer: It can let a caller make a service use a role with broader permissions.

Q32. How should secrets be referenced?

Model answer: Use a supported dynamic reference or secret service and narrowly scoped read permissions.

Q33. What does CAPABILITY_IAM acknowledge?

Model answer: It acknowledges that a template may create or modify IAM resources.

Q34. How find a failed stack root cause?

Model answer: Inspect stack events from the earliest failed resource and verify its service-side reason.

Q35. What is UPDATE_ROLLBACK_FAILED?

Model answer: The update rollback could not complete; fix the cause before continuing recovery.

Q36. Risk of disabling rollback?

Model answer: Partial resources can remain and require manual ownership and cleanup.

Q37. When is cfn-signal useful?

Model answer: When a supported creation policy must wait for bootstrap or instance configuration.

Q38. How do CloudFormation Hooks help?

Model answer: They evaluate configured resource operations and can warn or block them.

Q39. What is CloudFormation Guard for?

Model answer: It validates templates against policy rules, commonly before deployment.

Q40. What does aws cloudformation deploy do?

Model answer: It creates or updates a stack from a local template and supplied options.

Q41. Why package a template?

Model answer: To upload local artifacts and rewrite references to deployable S3 locations.

Q42. How can CI avoid static AWS keys?

Model answer: Use OIDC federation to assume a narrowly scoped role and obtain temporary STS credentials.

Q43. What is a StackSet?

Model answer: A control for deploying stack instances from one template across accounts and Regions.

Q44. Service-managed vs self-managed StackSets?

Model answer: Service-managed integrates with Organizations; self-managed uses configured roles in target accounts.

Q45. How reduce StackSet rollout risk?

Model answer: Use canaries, staged concurrency, failure tolerance and workload health checks.

Q46. Which deployment evidence should be retained?

Model answer: Commit, artifact checksum, target, parameters without secrets, role, change set, approval and verification.

Q47. How safely clean up a lab stack?

Model answer: Inspect retention policies and exports, delete the stack, then inventory retained resources and costs.

Q48. Describe a safe production update.

Model answer: Validate and package, inspect drift, create and review a change set, approve, execute, verify health and retain evidence.

Q49. How do you reconcile an emergency change made outside CloudFormation?

Model answer: Update or restore the template according to the approved incident decision, then run drift detection and verify the stack again.

Q50. How do you limit the blast radius of a CloudFormation release?

Model answer: Use isolated stacks and roles, review the change set, deploy to a canary target, monitor health and pause on failure.

Mock interview prompt

Choose a production case. Explain which events you would inspect first, how you would verify the cause, recover safely and prevent recurrence.

Cheat sheet

Command card

aws sts get-caller-identity
aws cloudformation validate-template --template-body file://template.yaml
aws cloudformation deploy --template-file template.yaml --stack-name app-dev
aws cloudformation describe-stacks --stack-name app-dev
aws cloudformation describe-stack-events --stack-name app-dev
aws cloudformation detect-stack-drift --stack-name app-dev
aws cloudformation delete-stack --stack-name app-dev

Before an update

  • Confirm account, Region, profile and execution role.
  • Review replacements, deletions and retention behavior in the change set.
  • Check drift, backups, alarms and rollback ownership.

Capstone lab and final quiz

Lab: review and deploy a controlled stack

Open the runnable SQS capstone lab and template ↗

  1. Write a template with a low-risk resource and parameterize the environment name.
  2. Run template checks, create a change set and review resource actions.
  3. Execute the change set in a sandbox and inspect stack events and outputs.
  4. Run drift detection, then clean up resources according to retention policy.

Final quiz

Sources and version notes

CloudFormation resource properties and CLI behavior evolve. Check current AWS documentation before deployment.