[AWS] Lab: CloudFormation nested stack

Overview:

  1. Create an S3 Bucket to store CloudFormation template
  2. Create Root Stack CloudFormation stack
  3. Create multi childstacks in rootestack

 

Create an S3 Bucket to store CloudFormation template

Update two files to the bucket:

noretain.json:

  

s3static.json

  

Create Root Stack CloudFormation stack

  1. Create template in Designer
  2. Create a root stack template
复制代码
{
    "AWSTemplateFormatVersion" : "2010-09-09",
    "Resources" : {
        "myStack" : {
           "Type" : "AWS::CloudFormation::Stack",
           "Properties" : { 
              "TemplateURL" : "https://<YOUR_SE_BUCKET>/noretain.json",
              "TimeoutInMinutes" : "60"
           }
        }
    }
}
复制代码

  3. Validate template and create stack

  4. Give stack a name and accept all default configuration.

What we have done is creating a rootStack and a child stack.

In rootStack, it only has childStack

In childStack, it has S3.

If we delete the Root Stack, Child Stack will be deleted as well. And S3 in Childstack will also be deleted.

 

Create multi ChildStaks in RootStack

Create CloudFormation rootStack:

复制代码
{
    "AWSTemplateFormatVersion" : "2010-09-09",
    "Resources" : {
        "myStack" : {
           "Type" : "AWS::CloudFormation::Stack",
           "Properties" : {
              "TemplateURL" : "https://<your_s3_bucket>/s3static.json",
              "TimeoutInMinutes" : "60"
           }
        },
        "myStack2" : {
            "Type" : "AWS::CloudFormation::Stack",
            "Properties" : {
               "TemplateURL" : "https://<your_s3_bucket>/noretain.json",
               "TimeoutInMinutes" : "60"
            }
         }    
    }
}
复制代码

 

posted @   Zhentiw  阅读(107)  评论(0编辑  收藏  举报
编辑推荐:
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
阅读排行:
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· AI技术革命,工作效率10个最佳AI工具
历史上的今天:
2020-04-10 [RxJS] Building an RxJS Operator
2020-04-10 [RxJS] Build an Event Combo Observable with RxJS (takeWhile, takeUntil, take, skip)
2018-04-10 [Tailwind] Style Elements on hover and focus with Tailwind’s State Variants
2018-04-10 [Tailwind] Apply mobile-first Responsive Classes in Tailwind
2018-04-10 [Tailwind] Create Custom Utility Classes in Tailwind
2018-04-10 [Tailwind] Get started with Tailwindcss
2017-04-10 [tmux] Copy and paste text from a tmux session
点击右上角即可分享
微信分享提示