A CDK-generated CloudFormation template differs unexpectedly between development and production.
Fix dependencies, context, and environment inputs so the generated template can be reviewed and compared.
Which approach is most appropriate?
Pin dependencies and CDK context, make account and Region explicit, and review the synthesized template in CI.
Detailed explanation
Explicit inputs reduce hidden environmental differences and make generated infrastructure comparable.
Explicit inputs reduce hidden environmental differences and make generated infrastructure comparable.
Audit-event order is not a stable input for infrastructure synthesis.
Audit-event order is not a stable input for infrastructure synthesis.
Random values increase drift and make generated output difficult to reproduce.
Random values increase drift and make generated output difficult to reproduce.
Library changes can alter the generated template even when application source is unchanged.
Library changes can alter the generated template even when application source is unchanged.
Check official documentation
Compare the following points with the official documentation.
AWS CDK context、package lock、synth、bootstrap、environmentの公式説明を確認する。
What to confirm
依存固定とランダム値、監査ログの役割を区別できる。
Key points
- CDK context
- Dependency pinning
- synth
- Reproducibility
Notes
- Environment: AWS公式DEA-C01試験ガイドと各サービスの公式ドキュメントの確認
- Confirm current AWS service behavior in the official DEA-C01 documentation.
Foundation review
Reproducible build
The same source, context, dependencies, and environment should yield comparable output.
Change review
Inspect permissions, replacement, deletion behavior, and resource differences in the synthesized template.