Longer Lambda Runs Come With Fine Print

AWS now lets on-demand Lambda functions run for half an hour, but concurrency, queue settings and network timeouts decide whether that headroom is usable.

Giving a Lambda function twice the time to finish also means it will hold twice the capacity while it does. That is the first warning in AWS’s announcement of a new ceiling of 30 minutes, or 1,800 seconds, for on-demand Lambda Event Functions, as reported by InfoQ. The old cap was 15 minutes.
The arithmetic comes first
The post’s authors, Tarun Rai Madan, Dan Slusariuc and Snehil Ameta, start with concurrency. It equals requests per second multiplied by average duration. Keep the request rate steady and a function allowed 30 minutes needs double the concurrency of one capped at 15. A single request per second, each lasting the full 30 minutes, adds up to 1,800 concurrent executions.
The upgrade itself is simple. It covers synchronous, asynchronous and event source mapping invocations in every commercial region, at standard pricing and with no opt-in. You change the timeout on each function individually, and anything above 1,800 seconds fails validation.
The limits around the function
AWS’s list of things to check:
- SQS: set the queue’s visibility timeout to at least six times the function timeout. For a 30-minute function that is three hours.
- Kinesis and DynamoDB Streams: a shard is read one batch at a time, so a sluggish function holds up the whole shard.
- Amazon MQ, DocumentDB and Kafka: mappings made before November 19 remain at 14 minutes.
- NAT gateways: idle connections are still dropped after 350 seconds.
- Init phase: still limited to 10 seconds.
A guideline, not a guardrail
Wibo van der Sluis, an independent AWS practitioner, probed the SQS advice in eu-west-1. He set a function to 1,800 seconds behind a queue whose visibility timeout was 90 minutes, then cut the queue’s value to 60 seconds. With the mapping still enabled, AWS accepted both edits. Creating a fresh mapping from that same queue, however, was refused. In his reading, the validation happens only when a mapping is created, so he recommends enforcing the six-times rule yourself.
He adds a warning about asynchronous calls: a function that times out three times will have burned 90 minutes before the event lands in a dead-letter queue. For slow code sitting behind an API, he concludes, 30 minutes is the wrong remedy.
Where it sits in the lineup
This is one of three forms Lambda has taken this year. Web Functions stay at 15 minutes and Lambda MicroVMs run up to eight hours. Lambda Managed Instances now give synchronous invocations 30 minutes, while asynchronous ones keep the 90 minutes added in September.
AWS says the workloads that hit the old wall include agentic AI requests that chain model and tool calls, media transcoding, Monte Carlo simulations and report generation.
The ceiling had been 15 minutes since 2018. Lambda started in 2014 at 60 seconds, which rose to five minutes in 2015.
What practitioners say
Luc van Donkersgoed, principal engineer at NS and an AWS Serverless Hero, wrote: “Hell froze over. AWS Lambda now supports 30-minute timeouts. I am not sure how I feel about this.”
Magnus Eriksson, an architect and former AWS employee, pointed out that Lambda is “quite expensive per CPU second compared to EC2”, so he would keep it for short-lived spiky loads. Matthew Bonig, an AWS DevTools Hero, joked that the cap will eventually reach eight hours, leaving everyone unsure when to pick it over MicroVMs.
On Reddit, the top reply liked that hour-long batch jobs might skip Fargate and ECS. Another commenter noted that a 30-minute run is billed for its whole duration at the configured memory, and that long jobs call for idempotent handlers and dead-letter queues. For multi-step work, that person said, Step Functions with Fargate or ECS is usually tidier.
Joseph Emison, CTO of Branch Insurance, sees the change as Lambda’s team conceding that Cloud Run is its strongest rival. Cloud Run services permit 60 minutes per request, and Azure Functions on the Flex Consumption and Premium plans impose no maximum, with a 60-minute grace period during scale-in. AWS has not said whether Lambda’s limit will move again.
Source: InfoQ
Morning to night, Reporting Team files on the machines and code changing daily life. We retell another publication's findings ourselves, always naming that publication and hyperlinking the original article.
Responses
One briefing. Every morning. Free.
Start the day with Circuit Courier: the essential AI & tech stories in one email.