Lambda Fundamentals
Write, deploy, and invoke your first AWS Lambda functions from the CLI, understand the execution model (handler, event, context, execution environment), and configure logging, timeouts, and IAM permissions correctly from the start.
Prerequisites: an AWS account with an IAM user or role that has programmatic access; AWS CLI v2 installed and configured (aws configure); basic comfort with either Python or Node.js.
Version note: verified against docs.aws.amazon.com/lambda, July 2026. This project targets python3.13 and nodejs22.x — both current, fully-supported managed runtimes. Avoid python3.9/3.10/3.11 and nodejs18.x/nodejs20.x in new work: 3.9 stopped receiving patches Dec 2025, nodejs20.x stopped receiving patches April 30 2026 (function creation blocked from Aug 31 2026, updates blocked from Sep 30 2026), and 3.10/3.11 are on a similar glide path. Run aws lambda list-runtimes or check the Lambda console's runtime dropdown for the definitive current list before you build anything beyond this tutorial.
A Lambda function is a single, stateless handler function that AWS runs for you on demand, inside a managed "execution environment" (a lightweight Firecracker microVM) that AWS provisions, patches, and tears down without you ever touching a server. You write a handler with a fixed signature — (event, context) — package it up, and Lambda invokes it whenever a configured trigger fires: an HTTP request, a new message on a queue, a file landing in S3, a schedule, or a direct API call.
The first invocation on a fresh execution environment pays a startup cost called a cold start (you'll dig into that in depth in the Cold Start Optimization project); subsequent invocations on the same warm environment skip that cost. Understanding that distinction — and the fact that Lambda, not you, decides when to reuse or discard an environment — explains most of what feels surprising about Lambda at first (global variables persisting between invocations, database connections needing to be re-validated, etc.).
Write and deploy your first function from the CLI
Invoke it and read the logs
Understand event, context, and the execution lifecycle
Configure timeout, memory, and least-privilege IAM
Secret Mission: build a two-function pipeline with its own IAM boundary
Before You Go
Test what you just learned
Self-testing is one of the best ways to retain new skills. Unlock project quizzes to check your understanding.
Log in to unlock0 / 7 complete
