- TypeScript
- JavaScript
- Python
- Java
- C#
- Go


- L1 (low-level): direct CloudFormation resource representations (one-to-one mapping).
- L2 (higher-level): typed APIs with sensible defaults and convenience methods.
- L3 (patterns): opinionated, reusable architecture patterns that combine multiple resources (for example, SNS+SQS fan-out or event-driven patterns).
cdk synth generates the AWS CloudFormation template (YAML/JSON) from your CDK app. It does not deploy resources; use cdk deploy for deployment. Always inspect synthesized templates to audit changes before applying them to production.- Store CDK code in a Git repository.
- Run unit tests, linters, and type checkers.
- Run
cdk synthto generate CloudFormation templates (or validate changes). - Deploy via a pipeline that either runs
cdk deployor hands off synthesized templates to CloudFormation.
- Unit and integration tests for constructs and stacks
- Linting and static analysis (e.g., type checks for TypeScript)
- Automated synth and policy checks (security and compliance)
- Environment promotion (dev → staging → prod) with parameterization


Be cautious with
RemovalPolicy.DESTROY for production data. This policy removes the bucket and its contents when the stack is deleted. For production, prefer RemovalPolicy.RETAIN and implement lifecycle/longevity strategies for data.- Encapsulate repeatable patterns into reusable constructs.
- Parameterize stacks for environment-specific configuration instead of hardcoding values.
- Enable CloudFormation stack policies and safeguards for sensitive resources.
- Use CDK bootstrapping and the CDK toolkit for multi-account, multi-region deployments (managed via AWS Organizations).
- Test CDK code with unit tests and integration tests, and validate synthesized templates before deployment.
- Integrate policy-as-code and security checks into the pipeline (for example, using automated checks against synthesized templates).

- What the AWS CDK is and how it synthesizes to CloudFormation
- Construct abstractions (L1, L2, L3) and why they matter
- Common CDK CLI commands and typical CI/CD flows
- A simple Python example that provisions an S3 bucket
- Best practices for building safe, reusable infrastructure code
- AWS CloudFormation documentation
- AWS CDK official documentation
- AWS CodePipeline (CI/CD Pipeline)
- Boto3 — AWS SDK for Python
- Amazon S3 documentation