Serverless backend patterns enable event-driven, scalable application architectures where cloud providers manage infrastructure, allowing developers to focus on business logic while paying only for actual compute time. These patterns—built primarily on AWS Lambda, Azure Functions, and Google Cloud Functions—provide automatic scaling, high availability, and reduced operational overhead for modern cloud-native applications. The key to successful serverless backends lies in understanding function invocation models, optimizing cold start performance, designing stateless workflows, managing dependencies and secrets, and implementing robust error handling with idempotent operations. Lambda's 2025 releases—including Durable Functions for checkpoint-based long-running executions, Managed Instances for EC2-backed steady-state workloads, and Tenant Isolation Mode for SaaS multi-tenancy—have significantly expanded what serverless can do, while the rise of AI agent patterns makes Lambda an increasingly central compute layer for agentic architectures.
What This Cheat Sheet Covers
This topic spans 26 focused tables and 227 indexed concepts. Below is a complete table-by-table outline of this topic, spanning foundational concepts through advanced details.
Table 1: Function Invocation Patterns
Understanding invocation modes is the foundation of serverless design—choosing sync vs async vs poll-based determines retry semantics, error propagation, and cost. Each model carries fundamentally different behavior for throttling, retries, and result handling.
| Pattern | Example | Description |
|---|---|---|
API Gateway → LambdaClient waits for response | • Caller waits for function completion • used for HTTP APIs, returns response directly • errors propagate to caller immediately | |
S3 event → Lambda (queued)Automatic retry 2x | • Function is queued for execution, caller receives immediate acknowledgment • supports automatic retries (up to 2 attempts) and destinations for success/failure • payload limit: 1 MB (increased from 256 KB) | |
Lambda polls SQS queueBatch size: 10 messages | • Lambda polls stream/queue (SQS, Kinesis, DynamoDB Streams) and invokes function with batches • enables partial batch failure handling | |
https://xyz.lambda-url.us-east-1.on.aws/Public HTTPS endpoint | • Dedicated HTTP(S) endpoint for Lambda without API Gateway • supports response streaming, CORS, IAM or no authentication • ideal for simple APIs and AI streaming responses | |
AWS SDK: lambda.invoke()Synchronous or async | • Programmatic function trigger via SDK/CLI • caller specifies InvocationType (RequestResponse, Event, DryRun) • useful for testing and orchestration |