AWS Lambda 30-Minute Timeout: What Changes for Agent Workloads

AWS Lambda 30-Minute Timeout: What Changes for Agent Workloads

Cloud Platform Engineering

AWS Lambda’s maximum timeout sat at 15 minutes for eight years. Last week it doubled to 30, and AWS names agentic requests that chain model and tool calls as the first workload it’s for. For platform teams that pushed long agent runs onto containers or Step Functions, the new limit reopens a simpler option, with a few network traps that can still cut a call off well before 30 minutes.

30 min
new maximum Lambda Event Function timeout, double the 15-minute limit that stood since 2018

What Happened

AWS’s weekly roundup traces the history: Lambda launched in 2014 with a 60-second timeout, moved to 5 minutes in 2015 and to 15 minutes in 2018. Any Event Function can now be configured for up to 30 minutes (1,800 seconds) for synchronous, asynchronous and event source mapping invocations. On Lambda Managed Instances, synchronous invocations also go to 30 minutes, while asynchronous and event source mapping calls keep the 90-minute timeout added in September. Standard pricing applies in all commercial Regions. Besides agents, AWS cites media transcoding and file conversion.

The same week, three services each shipped a piece of identity for agents. AWS STS added GetScopedCredentials, which takes temporary credentials a workload already holds and derives narrower ones; permissions only narrow, so a sub-agent can never get more access than its creator, and every call lands in CloudTrail. Amazon Cognito added dynamic client registration (RFC 7591), so MCP clients and agents can register at runtime instead of needing a pre-created app client. CloudFront Functions can now make network calls with cf.fetch(), at $0.10 per million calls, and AWS’s example is checking an agent’s permissions and usage budget at the edge before the request reaches an API or MCP server.

Why It Matters

The 15-minute ceiling shaped a lot of agent architecture. A multi-step agent request that might run 20 minutes had to be split, moved to containers, or wrapped in an orchestrator. A single function can now hold it. But AWS’s own warnings matter more than the headline. A service that invokes a function synchronously applies its own timeout. Client read and socket timeouts must be longer than the function’s. And a NAT gateway drops idle connections after 350 seconds, so a long call that waits silently on a model response needs keep-alives. For work beyond 30 minutes, AWS still points to durable functions, which run for up to a year and now emit OpenTelemetry traces, as we covered in Lambda durable functions telemetry.

What This Means for Builders

In our read, the identity launches matter as much as the timeout. Longer-running agents hold credentials longer and call more tools. GetScopedCredentials gives a direct way to hand each sub-agent or tool call a narrower, shorter-lived session than the parent function holds. Platform teams also get customer-managed runtimes: approved SDKs, certificates and monitoring agents packaged as an OCI image in ECR, picked up by functions as execution environments recycle, at no extra charge.

The So What

Before raising any agent function’s timeout past 15 minutes, platform teams should check three settings in the call path: the caller’s own timeout, client socket timeouts, and NAT keep-alives below 350 seconds. Then pair the change with GetScopedCredentials, so a function that runs twice as long doesn’t also run with its full role for 30 minutes.

Source: AWS News Blog

Content created with AI assistance and reviewed for accuracy.

💬

Join the conversation

Stack Insiders is our free community for readers who want to go deeper — share resources, ask questions, and connect with others across every vertical we cover.

Join Stack Insiders →

Newsletter coming soon.

Curated digests across AI, biohacking, photography, travel, and more. Be the first to know when we launch.