AWS Lambda doubles max timeout to 30 minutes: what changes

Architecture By 3 min read

AWS raises Lambda’s limit to 30 minutes across regions. Great for long jobs, but it shifts concurrency, cost, and orchestration. What to revisit.

AWS Lambda doubled the maximum function timeout to 30 minutes. It applies to synchronous, asynchronous, and event source mapping invocations in all commercial regions, at standard pricing and without opt-in. It’s per function; any value above 1,800 seconds is rejected with a validation error.

What happened

After eight years at 15 minutes, you can now set 30. Lambda also comes in three “shapes” this year: Web Functions stay at 15 minutes; Lambda MicroVMs allow up to 8 hours; and on Lambda Managed Instances, synchronous invocations get 30 minutes while asynchronous ones keep the 90 minutes introduced in September.

Workloads that pushed the limit: tool-chaining agentic AI, media transcoding, Monte Carlo simulations, report generation. In short, batchy loads that used to force a detour to Fargate/ECS by a hair.

Why it matters

Thirty minutes opens room for long jobs without leaving serverless. But it’s not free: your concurrency profile, bill, and idempotency guarantees all change. If you orchestrate with queues or streams, some neighbors didn’t move: NAT Gateway still drops idle connections after 350 seconds, and Lambda’s Init phase keeps its 10-second cap.

Also mind legacy mappings: those created before November 19 for Amazon MQ, DocumentDB, and Kafka remain capped at 14 minutes.

Concurrency and cost: do the math first

The arithmetic is simple and painful: concurrency = requests/second × average duration (seconds). Same traffic, double the duration, double the concurrency. Obvious example:

Texto
1 req/s × 1800 s = 1800 concurrent executions

You still pay for the entire duration at your configured memory size. If you move batch work to Lambda because it now fits in 30 minutes, compute cost per invocation and compare with Fargate/ECS or MicroVMs. If you raise timeout without touching code, you only extended the suffering.

Orchestration, queues, and streams

  • SQS: visibility should be at least 6× your function timeout. In practice, the hard check happens on mapping creation; later you can lower visibility without Lambda stopping you. It’s also unclear whether it compares to 6× or to the function timeout, so treat 6× as guidance you enforce via IaC/policies.
  • Kinesis and DynamoDB Streams: one batch per shard at a time; slow functions slow the entire shard.
  • NAT Gateway: drops idle sessions at 350 s; don’t assume long-lived connections will survive half an hour.
  • Init stays at 10 s. Thirty minutes won’t save you from cold starts that do real work.

Idempotency, retries, and SLAs

For async, three consecutive timeouts mean 90 minutes of accumulated runtime before the event hits the DLQ. If your handler isn’t idempotent, you’ll leave half-painted data behind. For multi-step work or anything needing explicit state and retries, Step Functions is still your friend; for sustained >30 minutes or steady CPU, consider Fargate/ECS or MicroVMs.

Also revisit timeouts and fallbacks in orchestrators, APIs, and clients. If API Gateway cuts at N seconds, it doesn’t matter your Lambda runs 25 minutes behind it: the user is gone and you pay the bill.

What I’d do

  • Audit functions exceeding 5–10 minutes: justify with business value or move to a healthier pattern.
  • Update IaC: set timeout=1800 only where it belongs and validate SQS visibilityTimeout accordingly (6×) via policy/CI.
  • Retune alarms: duration p95/p99, concurrency, DLQ, and budget. If you use Provisioned Concurrency, recheck peaks.
  • Ensure idempotency and checkpoints: guarded writes, progress markers, retry compression, and a DLQ with safe replay.
  • Revisit end-to-end SLAs: API Gateway/ALB/client timeouts, NAT limits, and backoffs.

Lambda’s changing fast this year, from timeouts to specialized compute, like GPU inference with 48 invocations per GPU. Good time to refactor patterns before growth refactors you.

My take: 30 minutes is a tool, not an excuse. If your API was slow, now it’ll be slow for twice as long. Use it for the right jobs and measure everything.

PS: if you set 1800 by default, don’t cry over the bill later.

Related posts

More categories