Create a stack in Cloudfromation and then updated it

Services Covered

  • CloudFormation CloudFormation
  • VPC VPC

Lab description

In this lab I will deploy resource using CloudFormation template. The first stack will include a VPC with two subnets – one private, one public – and route tables associated with them and with Internet Gateway. Then I will update the stack by replacing the template with another one with additional two private and public subnets in another Availability Zone.


Learning Objectives

  • Create CloudFormation template
  • Deploy CloudFormation template that create a VPC
  • Update CloudFormation stack

Lab date

05-12-2021


Prerequisites

  • AWS account

Lab steps

  1. Navigate to CloudFormation and create stack. Choose Template is ready and upload VPC_template.json to create a VPC with one private and one public subnets and route tables accordingly.

    The stack resources look like that:

  2. Update the stack by using VPC_template_update.json. Choose the stack created in previous step and click on Update, then choose Replace current template. This template will updated the stack to the following state:

Lab files

Acknowledgements

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *