Walkthrough with Nested CloudFormation Stacks

Walkthrough with Nested CloudFormation Stacks

AWS CloudFormation is a template model that is used to describe any AWS resources you need and AWS CloudFormation takes care of provisioning the resources for you. Developers and System Administrators use AWS CloudFormation templates because they do not need to create each and every resource and figure out what depends on what.

AWS CloudFormation is a template model that is used to describe any AWS resources you need and AWS CloudFormation takes care of provisioning the resources for you. Developers and System Administrators use AWS CloudFormation templates because they do not need to create each and every resource and figure out what depends on what.

CloudFormations are written in JSON format or in YAML format. A collection of AWS resources that are provisioned in a single CloudFormation is called a stack.

What are nested stacks?

When we see common settings and features in two or more Cloudformation scripts, we can use one nested CloudFormation script to create the infrastructure we need. The nested stack mechanism is, pointing to another CloudFormation script from one CloudFormation script. Reusing common template patterns using nested stacks is one of the best practices in CloudFormation.

Parent Stack and the Child Stack

Image for post

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-nested-stacks.html

As shown in the figure above, CloudFormation starts with the root stack(A). We can also call it as a parent stack. B is a child stack of A, C is a child stack of B and D is a child stack of C. There are two nested stacks(CloudFormation scripts) pointed in the parent stack A. There is only one Cloudformation script pointed in the B stack. Again there are two CloudFormation scripts pointed in the C stack.

In the code below I have shown how to point to a child stack CloudFormation script.

nested-stack cloudformation aws

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

How To Use AWS CloudFormation To Reduce Redundancy

Mr. X has been working on a very interesting, and meticulously written web application involving some heavy computation and a complete test suite. He architects the system well and chooses to host his application over AWS. In this tutorial, you'll see How To Use AWS CloudFormation To Reduce Redundancy

Authentication In MEAN Stack - A Quick Guide

Everything you should know about Authenticating in MEAN stack applications with comprehensive explanation and necessary code snippets.

Understand and Use Correctly AWS CloudFormation

Entry level information about CloudFormation. Understand and Use Correctly AWS CloudFormation

Hire AWS Developer

Looking to Hire Professional AWS Developers? The technology inventions have demanded all businesses to use and manage cloud-based computing services and Amazon is dominating the cloud computing services provider in the world. **[Hire AWS...

AWS Cost Allocation Tags and Cost Reduction

Learn more about AWS Cost Allocation Tags, tag examples via the web, CLI, and node.js, explore tag compliance services, and review tagging strategies.