
For eight years, the 15-minute timeout has been the hard limit that decided whether a job could run on AWS Lambda. That has changed. On-demand Lambda Event Functions can now run for up to 30 minutes (1,800 seconds). This works for synchronous, asynchronous and event source mapping invocations in all commercial AWS Regions, and standard Lambda pricing applies. For teams that run batch jobs, report generation, media processing or data imports, some work that had to be split up or moved to containers can now stay in Lambda. A longer timeout also changes how other parts of your setup behave, so check the items below before you raise it.
What changed
The AWS Compute Blog announcement sets out the new limits:
| Invocation type | On demand | Lambda Managed Instances |
|---|---|---|
| Synchronous | 30 minutes | 30 minutes |
| Asynchronous | 30 minutes | 90 minutes |
| Event source mapping | 30 minutes | 90 minutes |
Some limits stay the same. The Init phase is still capped at 10 seconds on demand. Provisioned concurrency and SnapStart keep their 15-minute initialisation limit. Event source mappings for Amazon MQ, Amazon DocumentDB, and Kafka mappings created before 19 November 2026 without provisioned mode stay at 14 minutes, so keep those functions at 840 seconds or less.
How to raise the timeout
Runtime, handler, IAM role and VPC settings do not change. You only update the timeout value. With the AWS CLI:
aws lambda update-function-configuration --function-name my-function --timeout 1800 --region us-east-1
In AWS SAM, set Timeout: 1800 under the function’s Properties. In the console, go to Configuration, then General configuration. The new value applies to invocations that start after the update. Event source mappings can take a few minutes to pick it up.
Settings to review before you raise it
A function that runs twice as long affects queues, connections and concurrency. Work through this checklist:
- Concurrency. Concurrency equals requests per second multiplied by average duration. If a function runs twice as long at the same traffic, it needs twice the concurrency. Check your account concurrency quota and any reserved concurrency so other functions are not throttled.
- SQS visibility timeout. AWS recommends setting the queue’s visibility timeout to at least six times the function timeout, which is three hours for a 30-minute function. Lambda only checks this when the mapping is created, so existing queues will not warn you. Otherwise messages can become visible again and be processed twice.
- Kinesis and DynamoDB Streams. Longer invocations slow down shard processing. Watch
IteratorAge, raise the parallelisation factor if needed, and turn on partial batch failure reporting. - NAT gateways and idle connections. NAT gateways drop idle connections after 350 seconds. Functions in a VPC that wait on a slow downstream call need TCP keep-alive. Also check idle timeouts on RDS, ElastiCache and any external APIs.
- Synchronous callers. Check that the service or client calling the function supports the longer duration. Set SDK read and socket timeouts above the function timeout. Otherwise the client gives up while the function keeps running and keeps billing.
- Credentials and tokens. Short-lived tokens fetched at the start of a run may expire before a 30-minute job finishes. Refresh them during the run.
- Idempotency. Lambda does not guarantee exactly-once processing, and long runs make retries more likely. Use idempotency keys. Powertools for AWS Lambda has helpers for this.
Durable functions and longer workflows
If a job may run longer than 30 minutes, the timeout increase is not the answer. Lambda durable functions checkpoint progress with step() and wait(). With durable functions, --timeout limits each invocation, while ExecutionTimeout in the durable configuration limits the whole execution. Asynchronous durable executions can run for up to a year. Synchronous and event source mapping executions are capped at 30 minutes on demand. Step Functions Standard workflows also pick up the new per-invocation limit.
When to use it, and when not to
The extra time suits jobs that sometimes ran close to 15 minutes and failed: large CSV imports, PDF or video processing, nightly database exports and long API syncs. Moving these back into a single function is simpler than splitting them into batches. Steady, CPU-heavy work that runs for most of the day is still usually cheaper on EC2, ECS or Lambda Managed Instances. Lambda bills by duration, so a function that now runs twice as long costs twice as much per invocation. Check CloudWatch duration metrics before and after the change.
How TechProvidence can help
We design and support AWS workloads for small businesses and development teams. That includes Lambda and SQS pipelines, VPC networking, cost reviews, and moving cron jobs from servers to serverless or back again. If you want help deciding whether a job belongs in Lambda, containers or EC2, contact us.
Source: AWS News Blog


