Menu
InfoQ Cloud·September 19, 2026

AWS Lambda Extends Timeout to 90 Minutes for Long-Running Serverless Workloads

AWS Lambda has increased its function timeout limit to 90 minutes for functions running on Lambda Managed Instances, significantly expanding its applicability to long-running serverless workloads like media processing, ETL, and AI inference. This change blurs the line between traditional servers and serverless functions, requiring careful consideration of idempotency, network connections, and credential management for robust designs. While simplifying many deployments, architects must weigh the economics and ensure Lambda remains the most suitable choice compared to alternatives like AWS Batch for certain persistent tasks.

Read original on InfoQ Cloud

Evolution of AWS Lambda for Long-Running Tasks

AWS Lambda's function timeout has progressively increased from an initial 5 minutes to 15 minutes, and now to 90 minutes for functions executing on Lambda Managed Instances. This significant extension addresses a long-standing pain point for developers attempting to use serverless for workloads that exceed short, bursty execution patterns. Use cases that traditionally required complex workarounds or alternative compute services can now potentially leverage Lambda, simplifying architecture for certain tasks.

ℹ️

Key Takeaway

The 90-minute timeout for AWS Lambda Managed Instances enables serverless to tackle workloads such as media processing, large-scale data transformations (ETL), complex financial calculations, and AI inference tasks that require more substantial compute time per invocation.

Architectural Considerations for Extended Lambda Runtimes

With longer execution times, new architectural considerations become critical. Developers must ensure network connections remain valid, temporary credentials do not expire mid-function, and operations are designed with idempotency in mind. The increased window for retries and potential duplicate deliveries necessitates robust error handling and mechanisms to ensure that repeated executions of a function produce the same result without unintended side effects, especially for critical operations like payments or database writes.

Idempotency and Error Handling

AWS explicitly warns that Lambda does not guarantee exactly-once processing. For long-running functions, the probability of encountering retries or duplicate invocations increases. Tools like Powertools for AWS Lambda can assist in implementing idempotency within function code, ensuring that even if a function is executed multiple times due to retries, the underlying operation (e.g., a database update) is applied only once logically.

  • Network Management: Ensure long-lived network connections are handled gracefully, perhaps with periodic heartbeats or re-establishment logic.
  • Credential Refresh: Implement mechanisms to refresh temporary AWS credentials before they expire to avoid mid-execution failures.
  • State Management: For functions that maintain state over their execution, design how state is persisted and recovered, especially in the event of a retry or crash.

Trade-offs and Alternatives

While the extended timeout simplifies many deployments, it also blurs the lines with other compute services. For workloads where the function is primarily waiting on external resources (I/O-bound) or requires continuous, steady-state processing, the economics of Lambda might not be optimal. Services like AWS Batch or ECS Tasks could offer a more cost-effective and suitable solution, especially if the total execution time involves significant idle periods. Architects should perform a cost-benefit analysis and consider the nature of the workload (CPU-bound vs. I/O-bound, sporadic vs. continuous) when choosing between Lambda and other compute options for tasks approaching the 90-minute limit.

AWS LambdaServerlessLong-Running WorkloadsTimeoutIdempotencyEvent-DrivenCloud ArchitectureDistributed Computing

Comments

Loading comments...