Ship a New Lambda Safely with Versions and an Alias
Intermediate · 30 minutes · 5 tasks, checked automatically · 100 points
In this lab you will learn how to deploy AWS Lambda functions safely using immutable versions and mutable aliases. You will create a Lambda function, publish numbered versions, wire an alias to control which version receives traffic, and then perform a zero-downtime promotion by updating the alias — all against a local AWS emulator. This pattern is the foundation of blue/green and canary Lambda deployments used in production.
What you’ll learn
- Create an IAM execution role and deploy a Lambda function from a zip package
- Publish immutable numbered versions of the Lambda function after each code change
- Create and manage a 'live' alias that points to a specific version, then promote it safely to a new version
How this lab works
- Start the lab: One click starts an emulated cloud on your computer, with the cloud’s own CLI ready: no account and no bill.
- Work through 5 tasks: Each task says what to build or fix. You do it yourself, in a real terminal, with hints when you get stuck.
- Check your work: Check my work reads the emulated cloud’s resources and says, task by task, what passed and what to fix.
- Finish and keep going: 100 points, your progress saved, and the next lab to try.
What it runs on
- Runs: An emulated cloud on your computer: no cloud account, no bill
- Cloud: AWS
- Services: Lambda, IAM
What you need
- A free LearnXops account
- The LearnXops desktop app for macOS, Windows or Linux
- Docker Desktop (or Podman / Rancher Desktop) installed and running
- A AWS sandbox created in the Local Cloud Playground
Topics: lambda, versions, alias, serverless, deployment, blue-green, rollback, iam
Create a free account to start this lab.
Keep going
- Trigger a Lambda from an SQS Queue with an Event Source Mapping
- Deploy a Cloud Function Triggered by Pub/Sub
- Deploy and Invoke a Cloud Run Service with Environment Variables
- Deploy an Azure Function Triggered by a Storage Queue
- Deploy an OCI Function to an Application and Invoke It
- Build a REST Endpoint with API Gateway and Lambda Proxy Integration