Ravi Sir's Cards › AWS
cdk diff before deploy
This revision card explains cdk diff before deploy. It starts from the need that deploy without diff can replace a table or change a name you did not intend. It describes cdk diff compares local synth to the deployed stack, like terraform plan for CDK. The how-to section notes always diff in CI and on prod stacks; abort if you see Resource replacement on data stores. An example on the card is diff shows IAM policy widen; you tighten before deploy.
Read card text
What this card says
Why do we need it?
Deploy without diff can replace a table or change a name you did not intend.
What is it?
cdk diff compares local synth to the deployed stack, like terraform plan for CDK.
cdk diff
How to do it
Always diff in CI and on prod stacks; abort if you see Resource replacement on data stores.
Example
Diff shows IAM policy widen; you tighten before deploy.