Lambda
ELI5 — The Vibe Check
AWS Lambda is where you upload a function and AWS runs it when something happens — an HTTP request, a file upload, a database change. You pay only for the milliseconds it runs. No server to manage, no idle costs. It's serverless magic and the poster child of FaaS.
Real Talk
AWS Lambda is a serverless compute service that runs code in response to events (HTTP via API Gateway, S3 uploads, DynamoDB streams, scheduled triggers). It auto-scales from zero to thousands of concurrent executions, charges per 100ms of runtime, and supports multiple runtimes (Node.js, Python, Go, etc.).
Show Me The Code
// Lambda triggered by API Gateway
export const handler = async (event) => {
const body = JSON.parse(event.body);
const result = await processOrder(body);
return {
statusCode: 200,
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(result)
};
};
When You'll Hear This
"The image resize runs as a Lambda triggered by the S3 upload." / "Lambda cold starts are adding 2 seconds of latency."
Related Terms
API Gateway
An API Gateway is the front door for all your APIs.
AWS (Amazon Web Services)
AWS is like a giant magical warehouse where you can rent computers, storage, databases, and basically anything tech-related — by the minute.
Cloud Function
A cloud function is a piece of code you deploy to the cloud that runs when triggered — by an HTTP request, a file upload, a timer, or another event.
Cold Start
A cold start is the delay you get when a serverless function hasn't been used for a while and the cloud needs to spin up a fresh container to run it.
FaaS (Function as a Service)
FaaS is when you write a tiny function and deploy it to the cloud, and it only runs (and charges you) when someone calls it.
S3 (Simple Storage Service)
S3 is Amazon's giant file locker in the sky.