Serverless
Compute with no servers to provision, patch, or scale. You pay only while code runs.
| Service | What it runs | Choose when | Key distinction |
|---|---|---|---|
| AWS Lambda | Short-lived functions | Event-driven work under 15 minutes | Per-request billing, scales to zero, cold starts |
| AWS Fargate | Long-lived containers | Containerized services with no time limit | A launch type for Amazon Elastic Container Service (ECS) / Amazon Elastic Kubernetes Service (EKS), always-warm tasks |
- Rule of thumb: function, event, brief → Lambda. Container, long-running → Fargate.
- Both remove the instance fleet; the difference is packaging (function vs container) and lifetime.