Skill 2.1.5

Determining when to use serverless technologies and patterns

Key Concepts

AWS Lambda runs code in response to events (API Gateway, S3, SQS, EventBridge, DynamoDB Streams) for up to 15 minutes, with memory from 128 MB to 10 GB and automatic scaling. It is ideal for spiky, event-driven and glue workloads and scales to zero.

Other serverless building blocks: API Gateway, DynamoDB, S3, SQS/SNS/EventBridge, Step Functions, Fargate, Aurora Serverless v2, Athena, Glue, Firehose and Cognito. A common pattern is a static site on S3 + CloudFront with API Gateway + Lambda + DynamoDB behind it.

Serverless is not ideal for long-running, steady, high-utilization workloads (EC2 or containers may be cheaper), for latency-critical work that cannot tolerate cold starts (mitigate with provisioned concurrency or SnapStart), or for apps needing OS-level control.