Template language and composition
- 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 | YAML and JSON structure | Choose a format and understand sections, indentation, intrinsic syntax and parser limits. | Concepts, commands, lab, production and troubleshooting |
| 2 | 06–13 · 7 min | Parameters and constraints | Design typed deployment inputs with allowed values, patterns and descriptions. | Concepts, commands, lab, production and troubleshooting |
| 3 | 13–21 · 8 min | Pseudo parameters and substitution | Use AWS pseudo parameters and Fn::Sub to construct environment-aware values. | Concepts, commands, lab, production and troubleshooting |
| 4 | 21–29 · 8 min | References and attributes | Use Ref and Fn::GetAtt correctly, and understand implicit dependencies. | Concepts, commands, lab, production and troubleshooting |
| 5 | 29–37 · 8 min | Mappings and conditions | Model fixed lookup data and intentionally include or omit resources. | Concepts, commands, lab, production and troubleshooting |
| 6 | 37–45 · 8 min | Outputs and exports | Expose non-secret deployment results and manage cross-stack export contracts. | Concepts, commands, lab, production and troubleshooting |
| 7 | 45–52 · 7 min | Transforms and reusable fragments | Understand transforms, macros and when a higher-level framework is appropriate. | Concepts, commands, lab, production and troubleshooting |
| 8 | 52–60 · 8 min | Linting and template validation | Combine cfn-lint, service validation and change review without confusing their guarantees. | 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.
YAML and JSON structure
Core concepts
Choose a format and understand sections, indentation, intrinsic syntax and parser limits.
- 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 → YAML and JSON structure → 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: YAML and JSON structure
- Validate the inputs and inspect the proposed resource action
- Execute in a sandbox and verify the resulting stack events
Commands and notes
cfn-lint 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: Choose a format and understand sections, indentation, intrinsic syntax and parser limits.
- 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: Choose a format and understand sections, indentation, intrinsic syntax and parser limits.
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: Choose a format and understand sections, indentation, intrinsic syntax and parser limits.
aws cloudformation describe-stack-events --stack-name app-dev --region us-east-1Narration script
Choose a format and understand sections, indentation, intrinsic syntax and parser limits.
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.
Parameters and constraints
Core concepts
Design typed deployment inputs with allowed values, patterns and descriptions.
- 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 → Parameters and constraints → 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: Parameters and constraints
- 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: Design typed deployment inputs with allowed values, patterns and descriptions.
- 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: Design typed deployment inputs with allowed values, patterns and descriptions.
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: Design typed deployment inputs with allowed values, patterns and descriptions.
aws cloudformation describe-stack-events --stack-name app-dev --region us-east-1Narration script
Design typed deployment inputs with allowed values, patterns and descriptions.
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.
Pseudo parameters and substitution
Core concepts
Use AWS pseudo parameters and Fn::Sub to construct environment-aware values.
- 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 → Pseudo parameters and substitution → 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: Pseudo parameters and substitution
- 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.yaml --parameters ParameterKey=Environment,ParameterValue=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: Use AWS pseudo parameters and Fn::Sub to construct environment-aware values.
- 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 AWS pseudo parameters and Fn::Sub to construct environment-aware values.
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 AWS pseudo parameters and Fn::Sub to construct environment-aware values.
aws cloudformation describe-stack-events --stack-name app-dev --region us-east-1Narration script
Use AWS pseudo parameters and Fn::Sub to construct environment-aware values.
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.
References and attributes
Core concepts
Use Ref and Fn::GetAtt correctly, and understand implicit dependencies.
- 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 → References and attributes → 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: References and attributes
- 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.yaml --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: Use Ref and Fn::GetAtt correctly, and understand implicit dependencies.
- 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 Ref and Fn::GetAtt correctly, and understand implicit dependencies.
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 Ref and Fn::GetAtt correctly, and understand implicit dependencies.
aws cloudformation describe-stack-events --stack-name app-dev --region us-east-1Narration script
Use Ref and Fn::GetAtt correctly, and understand implicit dependencies.
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.
Mappings and conditions
Core concepts
Model fixed lookup data and intentionally include or omit 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 → Mappings and conditions → 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: Mappings and conditions
- 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: Model fixed lookup data and intentionally include or omit 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: Model fixed lookup data and intentionally include or omit 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: Model fixed lookup data and intentionally include or omit resources.
aws cloudformation describe-stack-events --stack-name app-dev --region us-east-1Narration script
Model fixed lookup data and intentionally include or omit 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.
Outputs and exports
Core concepts
Expose non-secret deployment results and manage cross-stack export contracts.
- 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 → Outputs and exports → 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: Outputs and exports
- 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-dev --query Stacks[0].OutputsConfirm 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: Expose non-secret deployment results and manage cross-stack export contracts.
- 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: Expose non-secret deployment results and manage cross-stack export contracts.
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: Expose non-secret deployment results and manage cross-stack export contracts.
aws cloudformation describe-stack-events --stack-name app-dev --region us-east-1Narration script
Expose non-secret deployment results and manage cross-stack export contracts.
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.
Transforms and reusable fragments
Core concepts
Understand transforms, macros and when a higher-level framework is appropriate.
- 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 → Transforms and reusable fragments → 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: Transforms and reusable fragments
- 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: Understand transforms, macros and when a higher-level framework is appropriate.
- 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: Understand transforms, macros and when a higher-level framework is appropriate.
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: Understand transforms, macros and when a higher-level framework is appropriate.
aws cloudformation describe-stack-events --stack-name app-dev --region us-east-1Narration script
Understand transforms, macros and when a higher-level framework is appropriate.
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.
Linting and template validation
Core concepts
Combine cfn-lint, service validation and change review without confusing their guarantees.
- 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 → Linting and template validation → 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: Linting and template validation
- Validate the inputs and inspect the proposed resource action
- Execute in a sandbox and verify the resulting stack events
Commands and notes
aws cloudformation validate-template --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: Combine cfn-lint, service validation and change review without confusing their guarantees.
- 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: Combine cfn-lint, service validation and change review without confusing their guarantees.
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: Combine cfn-lint, service validation and change review without confusing their guarantees.
aws cloudformation describe-stack-events --stack-name app-dev --region us-east-1Narration script
Combine cfn-lint, service validation and change review without confusing their guarantees.
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.