AWS Lambda: Add support for Lambda Durable Functions#137
AWS Lambda: Add support for Lambda Durable Functions#137c10h22 wants to merge 6 commits intooss-serverless:mainfrom
Conversation
Add Lambda Durable Functions support with: - durableConfig property in serverless.yml (executionTimeout, retentionPeriodInDays) - Auto-enable versioning when durableConfig is present (required for qualified ARNs) - CloudFormation DurableConfig property generation - Deploy function support for durable configuration Durable functions enable long-running workflows that can span multiple Lambda invocations with automatic state management and checkpointing.
Automatically attach AWSLambdaBasicDurableExecutionRolePolicy managed policy to Lambda execution roles when durableConfig is present. This grants the necessary permissions for durable function operations including checkpoint management and execution state access.
Add --durable-execution-name option to serverless invoke command: - Enables idempotent invocations with unique execution names - Supports both synchronous and asynchronous durable invocations - Execution names must be 1-64 chars (alphanumeric, hyphens, underscores) - Repeated invocations with same name return cached results Usage: serverless invoke -f myFunc --durable-execution-name order-12345
Document durable functions feature including: - Configuration properties (executionTimeout, retentionPeriodInDays) - Supported runtimes (Node.js 22+, Python 3.13+) - IAM permissions and managed policy - Invoke command --durable-execution-name option - Usage examples and limitations
|
This looks very clean, I added a minor comment but honestly the rest looks good to me 👍 |
Move durable execution example to a more appropriate location in the invoke.md documentation and update example to include contextPath parameter.
|
@mnapoli moved that section below local invocation examples and used similar arguments for clarity |
| This example invokes a durable function with a unique execution name. If you invoke the same function with the same execution name again, Lambda returns the cached result from the previous execution instead of re-executing the function. This enables idempotent invocations for reliable workflow orchestration. | ||
|
|
||
| **Note:** Durable execution names must be 1-64 characters and contain only alphanumeric characters, hyphens, or underscores. See the [Functions guide](../guides/functions.md#aws-lambda-durable-functions) for more information on configuring durable functions. | ||
|
|
|
Is there anything blocking the merge? |
|
@zirkelc yes my comment above |
|
@c10h22 will you make the requested changes? I'd like to help out if you're busy with other things |
|
@zirkelc if you can just review and reorganise the documentation update 🙏🏻🙏🏻🙏🏻. Other than that everything should be okay we are using our branch in production without any notable issue. Unrelated issue that we need to fix later is when we attach an eventbridge trigger to a Durable Function we have to patch the target Arn to use the fully qualified Durable Function version when function versioning is off. For now we are using a plugin workaround but it's worth including it directly in osls |

On December 2nd, 2025, AWS introduced Durable Lambda Executions, enabling long-running, fault-tolerant workflows without custom chaining, self-invocation, or continuation persistence (announcement).
This PR adds support for Lambda Durable Functions :
Features:
durableConfigproperty withexecutionTimeout(1-31536000 seconds) andretentionPeriodInDays(1-90 days)durableConfigis present (required for qualified ARNs)AWSLambdaBasicDurableExecutionRolePolicy)--durable-execution-nameoption for idempotent invocationsUsage: