![aws cloudformation dynamodb table example aws cloudformation dynamodb table example](https://i.stack.imgur.com/wq90A.png)
For example, in the development stage, you will not have the same traffic as prod, therefore you can fine-grain the resources for your needs, and prevent spending extra money for unused resources.Īnother example is when an application is deployed to various regions, that have different traffic consumption and time spikes. The simplest example would be deploying the same CloudFormation stack to multiple stages, like beta, gamma and prod (dev, pre-prod, prod, or any other naming convention you prefer).ĭepending on which stage you deploy your application, you may want to set different properties to certain resources. Without parameters, it would be impossible to have robust and dynamic stacks, that are scalable and flexible. One of the biggest challenges when having nested stacks is parameters exchange between stacks. There must be only one root stack, which is called parent. Nested stacks can have themselves contain other nested stacks, resulting in a hierarchy of stacks, as shown in the diagram on the right-hand side. That is why nested stacks can be really useful.Ī nested stack is a simple stack resource of type AWS::CloudFormation::Stack. There is another reason, that may look unimportant, but CloudFormation stacks have a limit, which is 200 resources per stack, which can be easily reached as our application grows. A good example is load balancers and VPC network.
![aws cloudformation dynamodb table example aws cloudformation dynamodb table example](https://res.cloudinary.com/acloud-guru/image/fetch/c_thumb,f_auto,q_auto/https://acg-wordpress-content-production.s3.us-west-2.amazonaws.com/app/uploads/2020/08/DynamoDB_BlogHeader-1.jpg)
As our infrastructure grows, common patterns can emerge, which can be separated into dedicated templates, and re-used later in other templates.