Lambda Blue/Green Deployment
Deploy a Python Lambda function through a full blue/green lifecycle: create a PROD alias, configure CodeDeploy with Canary10Percent10Minutes and a CloudWatch alarm, then execute a canary deployment and force a rollback.

Lab Overview
In this lab you will go end-to-end with Lambda blue/green deployments using AWS CodeDeploy. You will create a Lambda function, publish versions, set up a PROD alias with traffic shifting, wire up a CloudWatch alarm on Lambda errors, and execute canary deployments. You will then simulate a failed deployment and watch CodeDeploy automatically roll back to the previous version.
You will:
- Create a Python Lambda function, publish versions, and configure a PROD alias
- Set up a CodeDeploy application and IAM service role for Lambda deployments
- Build a deployment group with Canary10Percent10Minutes and a CloudWatch alarm
- Execute a canary deployment and monitor traffic shifting in real time
- Force a CloudWatch alarm into ALARM state and watch CodeDeploy auto-rollback
- Document the blue/green pattern in an operational runbook
What You'll Learn
Create a Lambda function, publish versions, and configure an alias with weighted traffic routing
Set up a CodeDeploy application and IAM service role for Lambda blue/green deployments
Configure a deployment group with Canary10Percent10Minutes and a CloudWatch alarm wired for auto-rollback
Execute a canary deployment via CodeDeploy and monitor traffic shifting progress
Simulate a failed deployment, observe automatic rollback, and verify the alias returns to the previous version
Document the blue/green deployment pattern in an operational runbook
Prerequisites
aws-cli-basics
basic-lambda-knowledge
basic-iam-knowledge
Technologies Covered
Part of a Course
This lab is part of the AWS Certified DevOps Engineer - Professional (DOP-C02) course
View All CoursesChoose your plan
Simple, Transparent Pricing
Unlock full access to TeKanAid courses, labs, and bootcamps
Pro
Course content without labs
Renews automatically. Cancel anytime.
Final price verified at checkout.
- Full access to all courses
- Progress tracking
- Certificate of completion
- Community access
- Bootcamp participation
- New content access
Premium
Full access with hands-on labs
Renews automatically. Cancel anytime.
Final price verified at checkout.
- Everything in Pro
- Unlimited hands-on labs
- Lab AI Assistant
- Accelerator bootcamps with live office hours
- Priority support
Prefer a single course?
Purchase individual courses for a one-time fee of $79. Full access to course content, quizzes, certificates, and community features, lab access is not included.
Browse CoursesTry it free, no credit card
Three free ways to start. All bridge into the paid Premium catalog when you're ready.
Not ready to commit? The crash course is email-only. No academy account required.
Ready to Get Started?
Start this hands-on lab and build real-world Platform Engineering skills
Get Access Now