Subchapter 56.3
references/compute-decision-edge-cases.mdMarkdown8 KBView on GitHub
Tier 3 of the compute decision flow in SKILL.md: feature-level questions that are decided after the form factor and capacity provider are locked. Each section gives the question to ask, the decision, and the thresholds and caveats that the one-line summary in leaves out. Read this file when a request raises duration limits, cold starts or first-request latency, stream or queue lag, or tenant isolation.
SKILL.md| Form factor / feature | Ceiling | Notes |
|---|---|---|
| Event Functions · On-Demand | 15 min per invocation | Every invocation type |
| Web Functions | 15 min per request | Node.js only; On-Demand only |
| Event Functions · Managed Instances | 90 min per invocation | Asynchronous and event source mapping invocations only; synchronous invocations keep the 15-minute ceiling |
| MicroVMs | 8 h per session | Customer-managed lifecycle (launch/suspend/resume/terminate) within the session |
| Durable Functions | 1 year per execution (async invocation) | Each step is bounded by the Lambda timeout of the capacity provider it runs on; waits cost nothing |
| Step Functions | Standard 1 year, Express 5 min | See orchestration.md |
Anything longer than these is outside Lambda: aws-containers (ECS/Fargate) or aws-compute (EC2).
Ask for the overall duration and, if the work splits into tasks, the per-task duration (the per-step ceiling is min(task, overall)).
SKILL.md Step 3); the remaining choice is On-Demand vs Managed Instances per step duration.Decide form factor, programming model, and capacity first. Infer the symptom from metrics or the request when possible. If it is still unclear, ask in customer-observable terms: “Is only the first request after an idle period slow, or is a queue/stream backlog growing while traffic is being processed?”
ApproximateAgeOfOldestRecord or IteratorAge climbing, Kafka consumer lag) → provisioned mode for the event source mapping (minimum and maximum pollers / event poller units), on either Event Functions capacity provider. Provisioned mode controls input delivery: how quickly the event source mapping reads the source and hands records to Lambda. Provisioned Concurrency controls environment availability and does nothing for a backlog. Details: concurrency.md.ScalingConfig.MaximumConcurrency, 2–1,000) and ask: “Is the goal to cap throughput so the database is never overloaded, or to guarantee a minimum processing rate during spikes?” Maximum concurrency caps how many concurrent invocations that queue drives; the rest of the messages wait in the queue. It reserves nothing. A guaranteed floor needs provisioned mode for the event source mapping (minimum pollers) instead, and the two cannot be combined on the same mapping. Reserved concurrency caps the whole function across all triggers. “Steady” or “predictable” processing here is a throughput goal, not a traffic-shape signal, so it is not a Managed Instances signal. Details: concurrency.md.Web Functions use On-Demand capacity, but Provisioned Concurrency and SnapStart do not apply. Optimize application initialization and dependency loading, then continue with aws-lambda-web-functions for its latency and concurrency guidance. Do not send a Web Functions workload through the Event Functions Provisioned Concurrency/SnapStart decision path.
Steady state or “always busy” traffic cited to eliminate environment-launch latency → Managed Instances: warm, multi-concurrent instances remove repeated cold starts. Infer this from continuous utilization when the request or metrics establish it. If traffic shape is missing, ask whether peak traffic stays below twice the average within any 5–10 minute window (peak-to-mean ratio below 2) or drains and sits idle for meaningful periods. The threshold follows from how Managed Instances scales: asynchronously on CPU utilization and multi-concurrency saturation, so traffic that more than doubles within 5 minutes can be throttled while capacity is added (scaling (opens in a new tab)). Using Managed Instances requires creating a new function; Savings Plans and Reserved Instance pricing apply.