Compares deployed CloudFormation templates with locally synthesized CDK templates to detect drift, validate changes, and ensure consistency before deployment. Use when the user wants to compare CDK output with a deployed stack, check for infrastructure drift, run a pre-deployment validation, audit IAM or security changes, investigate a failing deployment, or perform a 'cdk diff'-style review. Triggered by phrases like 'compare templates', 'check for drift', 'cfn drift', 'stack comparison', 'infrastructure drift detection', 'safe to deploy', or 'what changed in my CDK stack'.
Does it follow best practices?
Evaluation — 100%
↑ 1.09xAgent success when using this tile
Validation for skill structure
Your team is preparing to deploy changes to the production monitoring stack (lct-monitoring-pr-stack). Before deploying, you need to compare the currently deployed CloudFormation template in the us-east-1 region with your local CDK changes to ensure you understand all differences and can assess deployment risk.
The local project uses make synth to synthesize templates. After comparison, you need to generate a formal comparison report that categorizes the changes and provides a deployment recommendation.
Create the following files:
comparison-script.sh - A bash script that:
comparison-report.md - A markdown report using this structure:
# CloudFormation Template Comparison
## Summary
- Deployed: <stack-name> (X resources)
- Local: <stack-name> (Y resources)
- Status: [✅ Safe to deploy | ⚠️ Review required | ❌ Critical issues]
## Differences
[List key differences found]
## Recommendations
[Actions required before deployment]
## Deployment Decision
[Approve | Reject | Conditional — reasoning]The script should use placeholder values for stack names and profiles where needed (e.g., <stack-name>, <profile>).