Using Canary Deployment Strategy for Application Rollouts

Using Canary Deployment Strategy for Application Rollouts
Using Canary Deployment Strategy for Application Rollouts

CLOUD LABS



Using Canary Deployment Strategy for Application Rollouts

In this Cloud Lab, you’ll learn to use the canary deployment strategy for AWS Lambda with CodeDeploy, gradually shifting traffic, monitoring errors with CloudWatch, and enabling automatic rollbacks.

8 Tasks

intermediate

1hr 30m

Certificate of Completion

Desktop OnlyDevice is not compatible.
No Setup Required
Amazon Web Services

Learning Objectives

An understanding of canary deployment and its significance in minimizing risk
Working knowledge of creating and managing Lambda functions and aliases
Hands-on experience deploying Lambda functions with CodeDeploy
The ability to monitor Lambda errors using CloudWatch alarms
Practical knowledge of configuring automatic rollbacks in CodeDeploy

Technologies
CodeDeploy logoCodeDeploy
Lambda logoLambda
CloudWatch logoCloudWatch
Cloud Lab Overview

AWS CodeDeploy and Lambda are powerful tools for deploying serverless applications with minimal downtime. Canary deployments provide a phased approach to routing traffic to new application versions, reducing risks associated with faulty updates. This Cloud Lab uses these technologies to ensure safe and reliable deployments.

In this Cloud Lab, you’ll create a Lambda function and its versions to simulate both stable and faulty code scenarios, assigning an alias to point to the stable version. You will then configure AWS CodeDeploy to deploy the Lambda function using a canary deployment strategy, where traffic is incrementally shifted from the stable version (via the alias) to the new version. Additionally, you will set up CloudWatch alarms to monitor errors during deployment and configure automatic rollback to the stable version in case of issues. Throughout the Cloud Lab, you will perform multiple tests to validate the alias functionality, observe the canary deployment process, monitor error detection, and ensure the rollback mechanisms work as expected.

After completing this Cloud Lab, you will gain hands-on experience with Lambda, CodeDeploy, and CloudWatch. You’ll learn to deploy applications safely using canary strategies, monitor for errors, and configure automated rollbacks. These skills are essential for ensuring application stability and will enhance your ability to manage serverless deployments effectively.

The following is the high-level architecture diagram of the infrastructure you will create in this Cloud Lab:

Canary deployment of Lambda function’s versions using an alias
Canary deployment of Lambda function’s versions using an alias

Cloud Lab Tasks
1.Introduction
Getting Started
2.Lambda Canary Deployment
Create a Lambda Function
Create Lambda Versions and an Alias
Create a Deployment
3.Canary Deployment with an Alarm
Create a CloudWatch Alarm
Add an Alam to the Deployment
4.Conclusion
Clean Up
Wrap Up
Labs Rules Apply
Stay within resource usage requirements.
Do not engage in cryptocurrency mining.
Do not engage in or encourage activity that is illegal.

Before you start...

Try these optional labs before starting this lab.

Relevant Courses

Use the following content to review prerequisites or explore specific concepts in detail.

Trusted by 1.4 million developers working at companies including

Don’t take our word for it. See what our developers have to say.

Your method is simple, straight to the point and I can practice with it everywhere, even from my phone, that's something I have never had in other learning platforms.

Felipe Matheus
TestimonialsImg

I highly recommend Educative. The courses are well organized and easy to understand.

Adina Ong
TestimonialsImg

I prefer Educative courses because they have a nice mix of text & images. I find that with full video courses, it can often be too easy to go into passive learning mode.

Clifford Fajardo
TestimonialsImg

I prefer Educative courses because they have a nice mix of text & images. I find that with full video courses, it can often be too easy to go into passive learning mode.

Clifford Fajardo
TestimonialsImg
Don’t take our word for it. See what our developers have to say.

Your method is simple, straight to the point and I can practice with it everywhere, even from my phone, that's something I have never had in other learning platforms.

Felipe Matheus
TestimonialsImg

I highly recommend Educative. The courses are well organized and easy to understand.

Adina Ong
TestimonialsImg

I prefer Educative courses because they have a nice mix of text & images. I find that with full video courses, it can often be too easy to go into passive learning mode.

Clifford Fajardo
TestimonialsImg

Get access to Educative Cloud Labs

Course Footer Image
Course Footer Image