Change sets & safe updates
Preview a change before it happens.
Applying an update blind is risky, because some property changes quietly replace a resource — a new database instance, a new bucket — rather than editing it in place. A change set is CloudFormation’s plan step: you submit the proposed template, CloudFormation computes exactly what it would do, and you review that diff — including which resources would be replaced — before choosing to execute it.
$ aws cloudformation create-change-set \--stack-name payments-network --change-set-name bump-size \--template-body file://template.yaml$ aws cloudformation describe-change-set \--stack-name payments-network --change-set-name bump-size \--query "Changes[].ResourceChange.[Action,LogicalResourceId,Replacement]" --output table| Modify | AppServer | True | <- Replacement: True = destroy & recreate
Read the Replacement column
The critical field is Replacement. Action tells you Add/Modify/Remove; Replacement: True on a Modify means the resource will be destroyed and recreated to satisfy the change, because you altered an immutable property. On a stateless server that is fine; on an RDS instance or an EBS volume it is data loss and downtime. The change set is where you catch that before it happens, then execute only if the plan is what you intended.
$ aws cloudformation execute-change-set \--stack-name payments-network --change-set-name bump-size# only after you have read the diff and accepted the replacements