I thought that this would be answered quite clearly out there on the internet. But I have found no sufficient answer to when to use one type of stacks and when to use another type of stacks.
I can perfectly model my infrastructure using only regular stacks. Also, I can perfectly model my infrastructure using only nested stacks and one root regular stack. From a project perspective - the only difference is stack type names. Everything else is the same.
For example, I am using AWS CDK - a synthesizer that can, for example, synthesize python to CloudFormation templates. I can do everything using Stacks and I can simply find-and-replace Stack to NestedStack. The infrastructure would be redeployed but nothing essentially has changed.
The biggest "difference" with nested stacks is that they become part of the parent stack. This means that if anything fails to deploy all stacks (parent and nested) get rolled back as one. By contrast with multiple stacks you could have the first one succeed to deploy, the second fail and roll back and the third not even attempt a deployment.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With