AWS for DevOps — Serverless
Chapter 9 — Serverless on AWS
Serverless means you write code and AWS handles everything else — provisioning, scaling, patching, and availability. You pay only when your code runs.
┌──────────────────────────────────────────────────┐
│ Serverless on AWS │
│ │
│ Lambda API Gateway DynamoDB │
│ (Compute) (HTTP endpoint) (Database) │
│ ┌─────┐ ┌──────────┐ ┌──────────┐ │
│ │ fn │◀────────│ REST / │ │ NoSQL │ │
│ │ │ │ HTTP API│ │ Tables │ │
│ └─────┘ └──────────┘ └──────────┘ │
│ │ ▲ │
│ └──────────────────────────────────┘ │
│ │
│ SAM Step Functions │
│ (Deploy) (Orchestrate) │
│ ┌─────┐ ┌──────────┐ │
│ │Build│ │ Workflow │ │
│ │Test │ │ State │ │
│ │Ship │ │ Machine │ │
│ └─────┘ └──────────┘ │
└──────────────────────────────────────────────────┘
What You’ll Learn
| Section | Topic | Key Concepts |
|---|---|---|
| 9.1 | Lambda Basics | Functions, handlers, runtimes, layers |
| 9.2 | API Gateway | REST APIs, HTTP APIs, integration with Lambda |
| 9.3 | DynamoDB for DevOps | Tables, keys, on-demand vs provisioned |
| 9.4 | SAM — Serverless Application Model | template.yaml, sam build, sam deploy |
| 9.5 | Event-Driven Architecture | S3 events, SQS triggers, EventBridge |
| 9.6 | Practice Exercises | Hands-on scenarios |
When to Go Serverless
| Use Serverless When | Use Containers/EC2 When |
|---|---|
| Variable/unpredictable traffic | Steady high traffic (cheaper at scale) |
| Short-lived tasks (< 15 min) | Long-running processes |
| Event-driven workloads | GPU / specialised hardware needed |
| Want zero server management | Need full OS control |
| Startup / small team | Large team with ops experience |
Next → Lambda Basics