Reuse and resource adoption
- 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 | Nested stack boundaries | Split a large template into reusable child stacks with clear interfaces. | Concepts, commands, lab, production and troubleshooting |
| 2 | 06–13 · 7 min | Nested stack artifacts | Package and version nested templates so parent deployments are reproducible. | Concepts, commands, lab, production and troubleshooting |
| 3 | 13–21 · 8 min | Cross-stack contracts | Manage exports and imports as versioned interfaces with deployment order. | Concepts, commands, lab, production and troubleshooting |
| 4 | 21–29 · 8 min | CloudFormation modules | Reuse standardized resource patterns through modules while keeping ownership clear. | Concepts, commands, lab, production and troubleshooting |
| 5 | 29–37 · 8 min | Resource import prerequisites | Check resource-type support, identifiers, matching properties and deletion policy. | Concepts, commands, lab, production and troubleshooting |
| 6 | 37–45 · 8 min | Import change sets | Adopt an existing resource through an import change set and validate afterward. | Concepts, commands, lab, production and troubleshooting |
| 7 | 45–52 · 7 min | Template generation and adoption | Evaluate generated templates as a starting point and review gaps before ownership. | Concepts, commands, lab, production and troubleshooting |
| 8 | 52–60 · 8 min | Refactor without recreation | Plan stack refactoring and resource moves while preserving physical resources. | 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.
Nested stack boundaries
Core concepts
Split a large template into reusable child stacks with clear interfaces.
- 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 → Nested stack boundaries → 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: Nested stack boundaries
- Validate the inputs and inspect the proposed resource action
- Execute in a sandbox and verify the resulting stack events
Commands and notes
aws cloudformation package --template-file parent.yaml --s3-bucket cfn-artifacts-example --output-template-file packaged.yamlConfirm 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: Split a large template into reusable child stacks with clear interfaces.
- 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: Split a large template into reusable child stacks with clear interfaces.
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: Split a large template into reusable child stacks with clear interfaces.
aws cloudformation describe-stack-events --stack-name app-dev --region us-east-1Narration script
Split a large template into reusable child stacks with clear interfaces.
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.
Nested stack artifacts
Core concepts
Package and version nested templates so parent deployments are reproducible.
- 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 → Nested stack artifacts → 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: Nested stack artifacts
- 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 parent-stackConfirm 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: Package and version nested templates so parent deployments are reproducible.
- 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: Package and version nested templates so parent deployments are reproducible.
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: Package and version nested templates so parent deployments are reproducible.
aws cloudformation describe-stack-events --stack-name app-dev --region us-east-1Narration script
Package and version nested templates so parent deployments are reproducible.
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.
Cross-stack contracts
Core concepts
Manage exports and imports as versioned interfaces with deployment order.
- 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 → Cross-stack contracts → 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: Cross-stack contracts
- Validate the inputs and inspect the proposed resource action
- Execute in a sandbox and verify the resulting stack events
Commands and notes
aws cloudformation list-exports --region us-east-1Confirm 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: Manage exports and imports as versioned interfaces with deployment order.
- 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: Manage exports and imports as versioned interfaces with deployment order.
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: Manage exports and imports as versioned interfaces with deployment order.
aws cloudformation describe-stack-events --stack-name app-dev --region us-east-1Narration script
Manage exports and imports as versioned interfaces with deployment order.
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.
CloudFormation modules
Core concepts
Reuse standardized resource patterns through modules while keeping ownership clear.
- 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 → CloudFormation modules → 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: CloudFormation modules
- 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-type --type MODULE --type-name MyCompany::Storage::Bucket::MODULEConfirm 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: Reuse standardized resource patterns through modules while keeping ownership clear.
- 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: Reuse standardized resource patterns through modules while keeping ownership clear.
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: Reuse standardized resource patterns through modules while keeping ownership clear.
aws cloudformation describe-stack-events --stack-name app-dev --region us-east-1Narration script
Reuse standardized resource patterns through modules while keeping ownership clear.
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.
Resource import prerequisites
Core concepts
Check resource-type support, identifiers, matching properties and deletion policy.
- 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 → Resource import prerequisites → 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: Resource import prerequisites
- Validate the inputs and inspect the proposed resource action
- Execute in a sandbox and verify the resulting stack events
Commands and notes
aws cloudformation get-template-summary --template-body file://template.yamlConfirm 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: Check resource-type support, identifiers, matching properties and deletion policy.
- 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: Check resource-type support, identifiers, matching properties and deletion policy.
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: Check resource-type support, identifiers, matching properties and deletion policy.
aws cloudformation describe-stack-events --stack-name app-dev --region us-east-1Narration script
Check resource-type support, identifiers, matching properties and deletion policy.
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.
Import change sets
Core concepts
Adopt an existing resource through an import change set and validate afterward.
- 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 → Import change sets → 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: Import change sets
- Validate the inputs and inspect the proposed resource action
- Execute in a sandbox and verify the resulting stack events
Commands and notes
aws cloudformation create-change-set --stack-name app-dev --change-set-name import-review --change-set-type IMPORT --template-body file://template.yamlConfirm 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: Adopt an existing resource through an import change set and validate afterward.
- 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: Adopt an existing resource through an import change set and validate afterward.
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: Adopt an existing resource through an import change set and validate afterward.
aws cloudformation describe-stack-events --stack-name app-dev --region us-east-1Narration script
Adopt an existing resource through an import change set and validate afterward.
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 generation and adoption
Core concepts
Evaluate generated templates as a starting point and review gaps before 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 → Template generation and adoption → 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 generation and adoption
- Validate the inputs and inspect the proposed resource action
- Execute in a sandbox and verify the resulting stack events
Commands and notes
aws cloudformation get-template --stack-name app-devConfirm 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: Evaluate generated templates as a starting point and review gaps before 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: Evaluate generated templates as a starting point and review gaps before 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: Evaluate generated templates as a starting point and review gaps before ownership.
aws cloudformation describe-stack-events --stack-name app-dev --region us-east-1Narration script
Evaluate generated templates as a starting point and review gaps before 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.
Refactor without recreation
Core concepts
Plan stack refactoring and resource moves while preserving physical resources.
- 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 → Refactor without recreation → 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: Refactor without recreation
- Validate the inputs and inspect the proposed resource action
- Execute in a sandbox and verify the resulting stack events
Commands and notes
aws cloudformation list-stack-resources --stack-name app-devConfirm 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: Plan stack refactoring and resource moves while preserving physical resources.
- 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: Plan stack refactoring and resource moves while preserving physical resources.
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: Plan stack refactoring and resource moves while preserving physical resources.
aws cloudformation describe-stack-events --stack-name app-dev --region us-east-1Narration script
Plan stack refactoring and resource moves while preserving physical resources.
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.
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.