Optional: troubleshooting, 50 production cases and 50 interview questions
- 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
| # | Time | Module | Core content | Learning views |
|---|---|---|---|---|
| 1 | 00–06 · 6 min | Troubleshooting method | Start with identity, stack status, earliest failed event and resource-level evidence. | Concepts, commands, lab, production and troubleshooting |
| 2 | 06–13 · 7 min | Template and validation failures | Diagnose malformed YAML, unsupported properties, missing parameters and transform errors. | Concepts, commands, lab, production and troubleshooting |
| 3 | 13–21 · 8 min | Authorization and PassRole failures | Trace caller, service-role, trust-policy and iam:PassRole denials. | Concepts, commands, lab, production and troubleshooting |
| 4 | 21–29 · 8 min | CREATE_FAILED and rollback | Use stack events and service-side events to fix create failures safely. | Concepts, commands, lab, production and troubleshooting |
| 5 | 29–37 · 8 min | UPDATE_ROLLBACK_FAILED recovery | Repair the cause, continue rollback and verify resource ownership. | Concepts, commands, lab, production and troubleshooting |
| 6 | 37–45 · 8 min | Timeouts and stabilization | Diagnose missing signals, provider stabilization and dependency cycles. | Concepts, commands, lab, production and troubleshooting |
| 7 | 45–52 · 7 min | Drift and unexpected replacement | Reconcile out-of-band edits and review replacement risk before retrying. | Concepts, commands, lab, production and troubleshooting |
| 8 | 52–60 · 8 min | 50 interview questions and mock review | Explain 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 sandboxLabs may create resources. Follow each lab's cleanup steps and verify stack status when finished.
Troubleshooting method
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
Template → Validate → Change set → Review → Execute → Troubleshooting method → Verify eventsKeep reviewable inputs and results at each stage; a change set does not apply proposed changes until execution.
Deployment state sequence
- Identify the requirement: Troubleshooting method
- Validate the inputs and inspect the proposed resource action
- Execute in a sandbox and verify the resulting stack events
Commands and notes
aws cloudformation describe-stacks --stack-name app-prodConfirm 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.
- Run the command and save its output.
- Compare it with the expected result and record differences.
- 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.
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-1Narration 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.
Template and validation failures
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
Template → Validate → Change set → Review → Execute → Template and validation failures → Verify eventsKeep reviewable inputs and results at each stage; a change set does not apply proposed changes until execution.
Deployment state sequence
- Identify the requirement: Template and validation failures
- Validate the inputs and inspect the proposed resource action
- Execute in a sandbox and verify the resulting stack events
Commands and notes
aws cloudformation describe-stack-events --stack-name app-prod --max-items 50Confirm 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.
- Run the command and save its output.
- Compare it with the expected result and record differences.
- 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.
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-1Narration 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.
Authorization and PassRole failures
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
Template → Validate → Change set → Review → Execute → Authorization and PassRole failures → Verify eventsKeep reviewable inputs and results at each stage; a change set does not apply proposed changes until execution.
Deployment state sequence
- Identify the requirement: Authorization and PassRole failures
- Validate the inputs and inspect the proposed resource action
- 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:UpdateStackConfirm 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.
- Run the command and save its output.
- Compare it with the expected result and record differences.
- 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.
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-1Narration 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.
CREATE_FAILED and rollback
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
Template → Validate → Change set → Review → Execute → CREATE_FAILED and rollback → Verify eventsKeep reviewable inputs and results at each stage; a change set does not apply proposed changes until execution.
Deployment state sequence
- Identify the requirement: CREATE_FAILED and rollback
- Validate the inputs and inspect the proposed resource action
- Execute in a sandbox and verify the resulting stack events
Commands and notes
aws cloudformation describe-stack-events --stack-name app-prod --max-items 50Confirm 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.
- Run the command and save its output.
- Compare it with the expected result and record differences.
- 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.
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-1Narration 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.
UPDATE_ROLLBACK_FAILED recovery
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
Template → Validate → Change set → Review → Execute → UPDATE_ROLLBACK_FAILED recovery → Verify eventsKeep reviewable inputs and results at each stage; a change set does not apply proposed changes until execution.
Deployment state sequence
- Identify the requirement: UPDATE_ROLLBACK_FAILED recovery
- Validate the inputs and inspect the proposed resource action
- Execute in a sandbox and verify the resulting stack events
Commands and notes
aws cloudformation continue-update-rollback --stack-name app-prodConfirm 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.
- Run the command and save its output.
- Compare it with the expected result and record differences.
- 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.
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-1Narration 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.
Timeouts and stabilization
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
Template → Validate → Change set → Review → Execute → Timeouts and stabilization → Verify eventsKeep reviewable inputs and results at each stage; a change set does not apply proposed changes until execution.
Deployment state sequence
- Identify the requirement: Timeouts and stabilization
- Validate the inputs and inspect the proposed resource action
- Execute in a sandbox and verify the resulting stack events
Commands and notes
aws cloudformation describe-stacks --stack-name app-prod --query Stacks[0].StackStatusConfirm 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.
- Run the command and save its output.
- Compare it with the expected result and record differences.
- 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.
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-1Narration 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.
Drift and unexpected replacement
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
Template → Validate → Change set → Review → Execute → Drift and unexpected replacement → Verify eventsKeep reviewable inputs and results at each stage; a change set does not apply proposed changes until execution.
Deployment state sequence
- Identify the requirement: Drift and unexpected replacement
- Validate the inputs and inspect the proposed resource action
- Execute in a sandbox and verify the resulting stack events
Commands and notes
aws cloudformation detect-stack-drift --stack-name app-prodConfirm 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.
- Run the command and save its output.
- Compare it with the expected result and record differences.
- 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.
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-1Narration 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.
50 interview questions and mock review
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
Template → Validate → Change set → Review → Execute → 50 interview questions and mock review → Verify eventsKeep reviewable inputs and results at each stage; a change set does not apply proposed changes until execution.
Deployment state sequence
- Identify the requirement: 50 interview questions and mock review
- Validate the inputs and inspect the proposed resource action
- Execute in a sandbox and verify the resulting stack events
Commands and notes
aws cloudformation describe-stack-resource-drifts --stack-name app-prodConfirm 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.
- Run the command and save its output.
- Compare it with the expected result and record differences.
- 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.
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-1Narration 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.
50 production cases + 50 interview questions
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-devBefore 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 ↗
- Write a template with a low-risk resource and parameterize the environment name.
- Run template checks, create a change set and review resource actions.
- Execute the change set in a sandbox and inspect stack events and outputs.
- 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.