AWS Lambda Serverless Computing
Ad
What is AWS Lambda?
Lambda runs your code without managing servers. You upload a function; AWS runs it on demand and scales automatically. You pay only for execution time — nothing when idle.
A Lambda Function
exports.handler = async (event) => {
return {
statusCode: 200,
body: JSON.stringify({ message: "Hello from Lambda!" })
};
};
How It Works
- An event triggers the function (HTTP, file upload, schedule).
- AWS spins up the function, runs it, then shuts it down.
- You're billed per millisecond of execution.
Common Triggers
| Trigger | Use case |
|---|---|
| API Gateway | REST APIs |
| S3 | Process uploads |
| EventBridge | Scheduled jobs |
| DynamoDB | React to data changes |
Pros & Cons
- ✅ No servers, auto-scale, pay-per-use.
- ❌ Cold starts, 15-min max runtime, harder debugging.
FAQs
What is serverless?
You write code; the cloud handles all infrastructure. "Serverless" doesn't mean no servers — just none you manage. More in our AWS section.
What is a cold start?
The delay when Lambda initializes a function that hasn't run recently.
