The mental model
CloudFormation describes resources and manages their lifecycle as a stack. AWS CDK lets you express infrastructure using a programming language and synthesizes CloudFormation templates. The source definition becomes reviewable, but a successful synthesis only shows that a template was produced; it does not prove the deployed system is secure or correct.
Review the planned changes, permissions, replacements, and deletion behavior before deployment. Stateful resources need explicit retention and recovery decisions. Keep environment configuration and secrets separate from reusable code. Changes made manually can create drift, so define how the team detects and reconciles infrastructure that no longer matches its intended definition.
Decisions to make
- Review generated infrastructure changes before applying them.
- Choose retention and recovery behavior deliberately for databases, buckets, and other stateful resources.
Design exercise · no AWS resources needed
Work through a scenario
A template update proposes replacing a production database.
- Identify which property change caused replacement.
- Write down the backup, data migration, and rollback implications.
- Decide what evidence must exist before the update can proceed.
Check your understanding
What does a successful CDK synthesis prove?
Choose an answer to see the reasoning.
Continue with AWS documentation
Before following a deployment guide, review current pricing, permissions, and cleanup steps. Budget alerts are not a hard spending cap.