0: CloudFormation Rollbacks
·1 min
Why do Stacks Fail?
- Insufficient permissions (IAM error)
- Need permissions for all the resources involved!
- Limits exceeded: Too many instances, e.g.
- So many possible reasons
Why would a rollback fail?
- Drift
- e.g. rolling back to an old (deleted) DB instance
- Not using drift detection
- Trying to delete parent stack before children in nested stacks
Troubleshooting Stack Failures:
- Study the messages during stack creation
- If EC2 issues:
- Study cloud-init
- Study logs in /var/log
- Install cloudWatch logs agent, publish logs
- If one resource is being persnickety:
- Put it in
RetainResources
param - Delete stack; resource will be retained
- Delete resource individually
- Put it in
- S3:
- Non-empty buckets won’t delete