Serverless compute is a cloud execution model where infrastructure management is abstracted away, allowing developers to deploy code that runs in response to events with automatic scaling and pay-per-use billing. The three major providers—AWS Lambda, Azure Functions, and Google Cloud Functions—each offer distinct runtime support, pricing structures, and integration ecosystems, while sharing challenges like cold starts and execution time limits. Understanding the nuances of concurrency models, deployment strategies, and observability patterns is critical: a function that cold-starts in 2 seconds might be fine for batch processing but unacceptable for user-facing APIs, and choosing between provisioned concurrency versus SnapStart can mean the difference between 50/month and 500/month in compute costs.
What This Cheat Sheet Covers
This topic spans 17 focused tables and 142 indexed concepts. Below is a complete table-by-table outline of this topic, spanning foundational concepts through advanced details.
Table 1: Execution Models
| Model | Example | Description |
|---|---|---|
aws lambda invoke --function-name MyFunc--payload '{"key":"value"}' | • Caller waits for response • used for API Gateway, ALB, and direct invocations • 6MB request/response limit (200MB with streaming) • timeout up to 15 minutes for Lambda, 60 minutes for Cloud Run. | |
aws lambda invoke --invocation-type Event--function-name MyFunc | • Lambda queues request and returns immediately • automatic retry up to 2 times • used for S3, SNS, EventBridge • supports destination routing for success/failure. | |
Lambda polls SQS queue every 1-20 seconds; processes batch of 1-10 messages | • Lambda pulls events from sources like SQS, Kinesis, DynamoDB Streams • supports batch processing with configurable batch size and window • built-in partial failure handling. |