AWS Serverless Services Cheat Sheet
- AWS serverless services allow running applications without provisioning or managing servers.
- Services automatically scale, provide built-in high availability, and use pay-per-use pricing.
- Core serverless stack: Lambda (compute) + API Gateway (API) + DynamoDB (database) + S3 (storage) + EventBridge (events) + Step Functions (orchestration).
Compute
AWS Lambda
- Run code without provisioning servers – event-driven, function-as-a-service.
- Triggers: 200+ event sources (S3, DynamoDB, SQS, API Gateway, EventBridge, Kinesis, etc.).
- Duration: max 15 minutes per invocation.
- Memory: 128MB – 10GB (CPU proportional).
- Concurrency: 1,000 default (can increase); Reserved and Provisioned Concurrency available.
- Pricing: per request ($0.20/million) + per GB-second of compute.
- Deployment: ZIP package (250MB unzipped) or container image (10GB).
- Layers: share code/libraries across functions (up to 5 layers).
- Versions & Aliases: immutable versions with aliases for traffic shifting (canary/linear).
- Lambda@Edge: run at CloudFront edge locations (viewer/origin request/response).
- SnapStart: reduce cold starts for Java functions (caches initialized snapshot).
AWS Fargate
- Serverless compute for containers – works with ECS and EKS.
- No EC2 instances to manage – per-task pricing (vCPU + memory per second).
- Each task runs in isolated microVM (Firecracker).
- Fargate Spot: up to 70% savings for fault-tolerant workloads.
AWS App Runner
- Fully managed – deploy from source code (GitHub) or container image to running web service in minutes.
- Auto-scales based on traffic; can pause when idle.
- Built-in HTTPS endpoint, load balancing, and certificate management.
API & Integration
Amazon API Gateway
- Create, publish, and manage REST, HTTP, and WebSocket APIs.
- REST API: full-featured (caching, request validation, WAF, usage plans, API keys).
- HTTP API: lower latency, lower cost, simpler (JWT authorizers, OIDC).
- WebSocket API: real-time two-way communication.
- Integrates with Lambda, HTTP backends, AWS services, and Mock integrations.
- Throttling: 10,000 requests/second default (account-level), burst 5,000.
- Stages: dev/staging/prod with stage variables and canary deployments.
AWS Step Functions
- Serverless orchestration – coordinate multiple AWS services into workflows.
- Standard Workflows: up to 1 year, exactly-once execution, audit history.
- Express Workflows: up to 5 minutes, at-least-once, high-volume event processing.
- States: Task, Choice, Parallel, Map, Wait, Pass, Succeed, Fail.
- Direct 200+ AWS service integrations (DynamoDB, SQS, SNS, ECS, Bedrock, etc.).
- Distributed Map: process millions of items in parallel from S3.
- Built-in error handling with Retry and Catch.
Amazon EventBridge
- Serverless event bus for event-driven architectures.
- 90+ AWS service events automatically; SaaS partner events; custom events.
- Content-based filtering, event archive/replay, schema registry.
- EventBridge Scheduler: one-time and recurring schedules (replaces CloudWatch Events cron).
- EventBridge Pipes: point-to-point integration with filtering and enrichment.
Data & Storage
Amazon DynamoDB
- Serverless NoSQL database – single-digit millisecond latency at any scale.
- Capacity modes: On-Demand (pay per request) or Provisioned (with Auto Scaling).
- DynamoDB Streams: capture item-level changes for event-driven processing.
- Global Tables: multi-region, multi-active replication.
- DAX: in-memory cache for microsecond read latency.
- TTL: automatic item expiration at no cost.
Amazon S3
- Serverless object storage – unlimited capacity, 11 nines durability.
- Event notifications to Lambda, SQS, SNS, EventBridge.
- S3 Object Lambda: transform data on retrieval using Lambda.
Amazon Aurora Serverless v2
- Serverless relational database – scales instantly from 0.5 to 256 ACUs.
- MySQL and PostgreSQL compatible.
- Scales to zero (when paused) for development workloads.
Messaging
Amazon SQS
- Serverless message queue – Standard (unlimited throughput) or FIFO (ordering + exactly-once).
- Retention up to 14 days. Visibility timeout, delay queues, dead-letter queues.
Amazon SNS
- Serverless pub/sub messaging – fan out to SQS, Lambda, HTTP, email, SMS.
- Message filtering on attributes. FIFO topics for ordered fan-out.
Other Serverless Services
- AWS AppSync – managed GraphQL and Pub/Sub API with real-time data sync.
- Amazon Cognito – serverless user authentication, authorization, and user management.
- AWS SAM (Serverless Application Model) – framework for building serverless applications (extends CloudFormation).
- Amazon Kinesis Data Firehose – serverless streaming ETL to S3, Redshift, OpenSearch.
- AWS Glue – serverless ETL for data preparation.
- Amazon OpenSearch Serverless – serverless search and analytics.
Serverless Architecture Patterns
- Synchronous API: API Gateway → Lambda → DynamoDB
- Asynchronous Processing: S3 Event → SQS → Lambda → DynamoDB
- Fan-out: SNS → multiple SQS queues → Lambda consumers
- Orchestration: API Gateway → Step Functions → (Lambda + DynamoDB + SNS)
- Event-driven: EventBridge → Lambda / Step Functions / SQS
- Streaming: Kinesis → Lambda → DynamoDB / S3
AWS Certification Exam Practice Questions
- A serverless application needs to coordinate a multi-step order processing workflow that includes payment, inventory check, and shipping. Each step may take variable time and needs error handling with retries. Which service orchestrates this?
- Amazon SQS with multiple queues
- Lambda calling Lambda
- AWS Step Functions
- EventBridge rules
- A Lambda function needs to process messages from an SQS queue but should handle no more than 5 messages concurrently to avoid overwhelming a downstream API. What controls this?
- SQS visibility timeout
- Lambda Reserved Concurrency set to 5
- SQS MaximumBatchSize
- Lambda timeout
- An application needs a serverless relational database that automatically scales based on load and has zero cost when there are no connections. Which service provides this?
- DynamoDB On-Demand
- RDS with Auto Scaling
- Aurora Serverless v2 (with pause)
- ElastiCache Serverless
- A company wants to create a REST API with caching, request validation, API keys for rate limiting, and AWS WAF integration. Which API Gateway type should they use?
- HTTP API
- REST API
- WebSocket API
- AppSync
Related Posts
References
AWS Serverless Overview
AWS Lambda Developer Guide
AWS Step Functions Developer Guide