Skip to content
Devgo

AWS Lambda

AWS's serverless compute — run code without managing servers. Lambda runs your function in response to events (HTTP requests, S3 uploads, schedules) and scales automatically. You pay per execution. No servers to manage but cold starts and limits. The original serverless function platform.

When to use
  • Event-driven processing (file uploads, webhooks).
  • Scheduled tasks (cron).
  • API backends (with API Gateway).
  • Sporadic/low-traffic workloads.
When not to
  • Long-running processes (>15 min).
  • Constant high traffic (EC2/Fargate is cheaper).
  • Stateful apps.
  • When you need predictable latency (cold starts).

Definition

Lambda runs code (, , Go, etc.) in response to events without provisioning servers. Scales automatically from 0 to thousands of concurrent executions. Pay per invocation + duration. 15-minute max execution. Cold starts (latency on first call). Integrates with 200+ AWS services.

Why it exists

To let developers run code in response to events without managing servers, scaling, or capacity — paying only for actual usage, ideal for sporadic or event-driven workloads.

How it works

Upload code (zip or image). Configure trigger ( for , S3 for uploads, EventBridge for schedules). Lambda runs the when triggered, scales concurrently, and stops when idle. Pay per request + ms of duration. Memory: 128MB-10GB. : up to 15 min.

Scaling limits

Cold starts (latency on first call after idle). 15-minute . 10GB memory max. Concurrent execution limits (1000 default). No state between calls. Hard to debug. Vendor lock-in.

Cost shape

Free tier: 1M requests + 400k GB-sec/month. Then $0.20 per 1M requests + duration. Cheap for sporadic traffic, expensive for constant high load.

Alternatives

  • Cloudflare Workers — Edge, faster cold starts, JS/WASM only.
  • Google Cloud Functions — Similar, GCP ecosystem.
  • Fargate — Containers, no , but you manage more.

Failure modes

  • Cold starts.
  • 15-minute .
  • Concurrency limits.
  • Hard to debug/trace.
  • Vendor lock-in.

, ,