
AWS Lambda Durable Function, which enables long-running execution, has been announced #AWSreInvent
This page has been translated by machine translation. View original
Hello, this is Morita.
At the re:Invent 2025 keynote currently being held in Las Vegas, AWS Lambda Durable Function, which specializes in AI workflows and multi-step applications, was announced.
Durable Function
Durable Function is a feature that allows workloads to be suspended and resumed.
It's possible to pause execution for up to 1 year.
Architecture
Source: https://docs.aws.amazon.com/lambda/latest/dg/durable-functions.html
Internally, Durable Functions are the same as regular Lambda functions.
The difference is that they have checkpoint/replay capabilities.
When a function resumes from suspension points such as waiting or retries, the system executes a replay.
During replay, code is executed from the beginning, but parts that have already completed checkpoints are skipped.
In this case, instead of re-executing completed operations, the previously saved results are reused.
To use these features, you need to add the "Durable Execution SDK" to your AWS Lambda source code.
The Durable Execution SDK wraps the Lambda event handler, applying DurableContext that enables control of checkpoint/replay.
from aws_durable_execution_sdk_python import (
DurableContext,
durable_execution,
durable_step,
)
from aws_durable_execution_sdk_python.config import Duration
@durable_step
def validate_order(step_context, order_id):
step_context.logger.info(f"Validating order {order_id}")
return {"orderId": order_id, "status": "validated"}
@durable_step
def process_payment(step_context, order_id):
step_context.logger.info(f"Processing payment for order {order_id}")
return {"orderId": order_id, "status": "paid", "amount": 99.99}
@durable_step
def confirm_order(step_context, order_id):
step_context.logger.info(f"Confirming order {order_id}")
return {"orderId": order_id, "status": "confirmed"}
@durable_execution
def lambda_handler(event, context: DurableContext):
order_id = event['orderId']
# Step 1: Validate order
validation_result = context.step(validate_order(order_id))
# Step 2: Process payment
payment_result = context.step(process_payment(order_id))
# Wait for 10 seconds to simulate external confirmation
context.wait(Duration.from_seconds(10))
# Step 3: Confirm order
confirmation_result = context.step(confirm_order(order_id))
return {
"orderId": order_id,
"status": "completed",
"steps": [validation_result, payment_result, confirmation_result]
}
If you need to pause execution, you can add a wait to suspend the function, and no charges are incurred during this time.
Conclusion
AWS Lambda's Durable Function appears to be a very powerful option for workloads that require long-running execution or suspension and resumption, such as AI workflows and multi-step applications.
In particular, the ability to pause execution for up to 1 year without incurring charges during that time seems to offer benefits in terms of cost efficiency.

