Updating CloudFormation Stacks with Direct Updates and Change Sets

1 hour
  • 3 Learning Objectives

About this Hands-on Lab

In this hands-on lab, we will walk through proper ways to update CloudFormation stacks. We will first update a stack with direct updates, and then use change sets to update a stack. In the process, we will create multiple change sets and view the behavior of the stack when a change set is applied.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Deploy a LAMP Stack Using an AWS CloudFormation Template

From the CloudFormation console, click Create stack.

Upload the LAMP stack template provided with the lab, and create the stack.

Select your VPC and two subnets in the template. Note that you will need to create a keypair in the EC2 console before you can deploy the template.

Once it is deployed, check the CloudFormation Outputs for the DNS name of the Load Balancer. Copy the URL into a browser to verify that the sample site has deployed correctly

Use an Update Stack to Scale Up

Our site is under a lot of load so we want to try scaling up (increasing instance size). Let’s do a CloudFormation update stack to make this happen.

From the CloudFormation console, click Update stack and change the instance type from t3.small to t3.medium in the Parameters page.

Using the load balancer, verify that our server comes up and the site becomes available once more.

Use a Change Set to Scale Out

Scaling our environment up helped somewhat, but our team believes we would benefit from scaling out instead, and we will then have the added benefit of some redundancy in case an Availability Zone goes offline.

Use a CloudFormation Change Set to add a second server to the template, in another subnet and ensure that it is added to the load balancer.

View and then execute the change set. Once it is finished, use the load balancer DNS name again to check that the site is up and running.

Additional Resources

Please log in to the AWS environment using the credentials provided. Make sure you are using us-east-1 (N. Virginia) as the selected region.

The lab uses two CloudFormation templates, which you can download at the lab GitHub repository.

What are Hands-on Labs

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Get Started
Who’s going to be learning?

How many seats do you need?

  • $499 USD per seat per year
  • Billed Annually
  • Renews in 12 months

Ready to accelerate learning?

For over 25 licenses, a member of our sales team will walk you through a custom tailored solution for your business.


Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!