# Serverless and Managed Compute

> Run code as functions or scale-to-zero containers, wired to events, and learn where serverless shines and where it hurts. Free notes, key concepts, resources...

Canonical: https://www.internhack.in/roadmaps/tracks/devops/serverless
Last updated: 2026-11-28

Run code as functions or scale-to-zero containers, wired to events, and learn where serverless shines and where it hurts.

Intermediate · about 6 hours · difficulty 3/5

Learn first: [AWS Core Services](https://www.internhack.in/roadmaps/tracks/devops/aws-core)

Serverless means you never manage servers or clusters: you hand the platform code or a container image, and it runs, scales and bills per invocation or per second.

### The main shapes

- **Functions as a Service**: AWS Lambda, Azure Functions, Google Cloud Functions. Short-lived handlers triggered by events.
- **Serverless containers**: Cloud Run, Azure Container Apps, AWS Fargate and App Runner. Any container, scaled on HTTP requests or queue depth.
- **Serverless data services**: DynamoDB, Aurora Serverless, S3, SQS, EventBridge, Pub/Sub.

### Event-driven design

Functions shine when glued to events: an object lands in a bucket, a message arrives on a queue, a cron schedule fires, an API Gateway route is called. Design handlers to be **idempotent** (the same event may arrive twice), keep them small, and push failures to a **dead-letter queue**.

### Operational realities

- **Cold starts** add latency when a new instance boots; mitigate with smaller packages, provisioned concurrency or min instances.
- **Limits**: execution timeouts, payload sizes and concurrency quotas.
- **Observability** needs structured logs and tracing because you cannot SSH in.
- **Cost** is tiny at low volume but can exceed a container at steady high load.
- Package and deploy with IaC (Terraform, SAM, Serverless Framework, CDK), not console uploads.

**Good enough to move on:** you can build an event pipeline with a queue, a function and a dead-letter queue, explain cold starts, and estimate when a steady workload would be cheaper on containers.

## Key concepts

- **Functions as a Service**
- **Serverless containers**
- **Event sources and triggers**
- **API gateways**
- **Idempotency and dead-letter queues**
- **Cold starts and concurrency limits**
- **SAM, CDK and Serverless Framework**

## Mini project

Build an image-thumbnail pipeline: upload to a bucket triggers a function that writes a resized copy to a second bucket, with failures routed to a dead-letter queue and an alarm on it.

## Check yourself

A queue-triggered function occasionally processes the same message twice. Why does that happen, and how do you make it harmless?

## Free resources

- [AWS Lambda developer guide](https://docs.aws.amazon.com/lambda/latest/dg/) (AWS)
- [Cloud Run documentation](https://cloud.google.com/run/docs) (Google Cloud)
- [Azure Functions documentation](https://learn.microsoft.com/en-us/azure/azure-functions/) (Microsoft)

Previous: [Cloud Networking and Storage Design](https://www.internhack.in/roadmaps/tracks/devops/cloud-networking-storage) · Next: [Infrastructure as Code Principles](https://www.internhack.in/roadmaps/tracks/devops/iac-concepts)

## More in Cloud Platforms

- [Cloud Computing Concepts](https://www.internhack.in/roadmaps/tracks/devops/cloud-concepts)
- [AWS Core Services](https://www.internhack.in/roadmaps/tracks/devops/aws-core)
- [Microsoft Azure Core Services](https://www.internhack.in/roadmaps/tracks/devops/azure-core)
- [Google Cloud Core Services](https://www.internhack.in/roadmaps/tracks/devops/gcp-core)
- [Cloud Networking and Storage Design](https://www.internhack.in/roadmaps/tracks/devops/cloud-networking-storage)
- [Serverless and Managed Compute](https://www.internhack.in/roadmaps/tracks/devops/serverless)

## Related

- [Roadmaps](https://www.internhack.in/roadmaps)
- [DevOps Engineer Roadmap](https://www.internhack.in/roadmaps/tracks/devops)
