Creates test stacks, analyzes CloudFormation events, compares actual vs documented update behavior, then confirms whether a resource property change triggers replacement rather than an in-place update. Use when: testing if a CFN property change causes resource replacement; investigating stack update behavior, "Update requires" documentation accuracy; validating whether a workaround (e.g. hash-based logical IDs) is actually necessary; questioning UpdateRequiresReplacement behavior for immutable properties; needing empirical evidence before an architectural decision involving CDK/CloudFormation stack updates.
68
83%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Low
Low-risk findings worth noting
Empirically validate how CloudFormation handles specific resource property changes by deploying a controlled test stack, making a targeted change, and observing actual CFN events — then deciding whether workarounds are justified.
Documentation is a hypothesis, not a fact: the "Update requires" value is maintained by hand and drifts from actual resource-provider behavior, and it never encodes interaction effects between properties on the same resource. Treat every rating as unverified until real CFN events back it up — never carry a workaround, or its removal, into production on a documentation read alone. A change CloudFormation applies in-place can still be disruptive underneath: a Lambda VPC change is rated "some interruption" but always forces ENI churn that shows up only in the ELASTIC_NETWORK_INTERFACE events, never on the Lambda resource's own status line.
Decision framework:
cdk deploy does not tell you whether the result was an in-place update or a replacement; always read the ResourceStatus transitions.When to use this skill:
UpdateReplacePolicy overrides, forced replacement) is proposed and its necessity is unconfirmed.When NOT to use this skill:
// Example: minimal CDK stack parameterised via context
export class BehaviorTestStack extends cdk.Stack {
constructor(scope: Construct, id: string, props?: cdk.StackProps) {
super(scope, id, props);
// Add only the resource under test, driven by this.node.tryGetContext(...)
}
}# 1. Deploy initial state
cdk deploy --require-approval never
# 2. Record resource ARNs / IDs, confirm any required manual steps (e.g. email confirmation)
# 3. Make the single property change, then redeploy
cdk deploy --require-approval never
# 4. Inspect CFN events — stop and debug if deployment fails before proceeding
aws cloudformation describe-stack-events \
--stack-name <stack-name> \
--query 'StackEvents[?ResourceType==`<ResourceType>`].[Timestamp,ResourceStatus,ResourceStatusReason]' \
--output tableValidation gates:
## CloudFormation Behavior Test Results
- **Date / Region / CDK Version:**
- **Resource Type & Property Changed:**
- **AWS Docs Say:** "Update requires: ..."
- **What Actually Happened:** [UPDATE_IN_PLACE | REPLACEMENT | NO-OP | error]
- **CFN Events:** [paste relevant rows]
- **Matches Docs:** Yes / No
- **Workaround Needed:** Yes / No — Reasoning: ...
- **Code Changes:** [commit/PR link]Update the code: implement or remove the workaround and add a comment citing this test.
cfn-template-compare — Compare deployed vs local templatesaws-cdk — General AWS CDK developmentterraform-validator — Similar testing for TerraformUPDATE_ROLLBACK_FAILED stack statusUPDATE_ROLLBACK_FAILED as a transient error and retry.aws cloudformation continue-update-rollback \
--stack-name <stack-name> \
--resources-to-skip <LogicalResourceId>aws:cdk:path metadata and synthesizer version fields that differ between environments but are not functional differences; filter these before comparing.jq 'del(.Metadata."aws:cdk:path", .Metadata."aws:asset:path")' template.json > template.normalized.jsonDeletionPolicy: RetainCREATE_COMPLETE; for RDS, DynamoDB, EFS, or any resource holding real data, that deletion is permanent. Set DeletionPolicy: Retain (and UpdateReplacePolicy: Retain) before the change, never after.MyTestTable:
Type: AWS::DynamoDB::Table
DeletionPolicy: Retain
UpdateReplacePolicy: Retain
Properties:
# property under test goes hereENI events, never on the Lambda resource's own status line.| Script | Location | Purpose |
|---|---|---|
watch-cfn-events.sh | ./scripts/watch-cfn-events.sh | Stream CFN events in real-time during deployment |
compare-resources.sh | ./scripts/compare-resources.sh | Diff resource properties before and after deployment |
See EXAMPLES.md in this skill directory for a full walkthrough of an SNS email subscription endpoint change test.
a1083f4
Also appears in
last in sync Aug 28, 2026
last in sync Aug 28, 2026
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.