Serverless Refactoring And Modernization — AWS Solutions Architect Pro (SAP-C02)
Lambda 15-Minute Ceiling Forces Fargate for Long-Running Jobs
Lambda and Fargate both run code without provisioning servers, but they are not interchangeable. Lambda's maximum execution duration is 15 minutes per invocation. Fargate has no execution time limit and runs containerized workloads indefinitely. A batch job that processes large files sequentially, accumulates state across steps, or has variable duration exceeding 15 minutes cannot be implemented as a single Lambda function. SAP-C02 questions signal this with 'multi-hour processing,' 'large file transformation,' or 'sequential pipeline with shared state.' Chaining Lambda via SQS to bypass the timeout adds complexity without fixing the architectural mismatch with long-duration workloads.
What This Pattern Tests
The exam describes a workload and tests whether serverless is the right modernization path. Lambda works for event-driven, short-duration workloads (API handlers, file processors, stream consumers). It fails for long-running processes (>15 min), workloads needing persistent connections (WebSockets need API Gateway WebSocket APIs), or high-throughput steady-state (Lambda per-invocation cost exceeds Fargate at ~1M requests/day). Lambda in a VPC adds cold start latency (VPC ENI creation) unless you use provisioned concurrency ($$$). Step Functions orchestrate multi-step workflows that exceed Lambda timeout. The trap is assuming Lambda is always the modernization answer.
Decision Axis
Workload duration, traffic pattern, and connection requirements determine whether serverless fits or a container is cheaper and simpler.
Associated Traps
More Top Traps on This Exam
Decision Rules
When a workload is stateless, short-duration, and bursty with long daily idle windows, Lambda plus API Gateway satisfies both minimize-operational-overhead and pay-per-use-efficiency simultaneously; a container-based alternative such as Fargate with ECS imposes task sizing, minimum running-task count, and cluster configuration overhead that directly violates the dominant constraint even though it eliminates EC2 instance management.
When the workload is stateless, short-duration, and variably loaded with long idle windows, Lambda + API Gateway + DynamoDB satisfies the minimize-operational-overhead and pay-per-use constraints decisively; Fargate is the near-right trap because it modernizes the monolith but imposes cluster sizing, minimum running task counts, and persistent idle cost that violate the stated constraints.
Domain Coverage
Difficulty Breakdown