interface DurableConfig
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.Lambda.DurableConfig |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awslambda#DurableConfig |
Java | software.amazon.awscdk.services.lambda.DurableConfig |
Python | aws_cdk.aws_lambda.DurableConfig |
TypeScript (source) | aws-cdk-lib » aws_lambda » DurableConfig |
Configuration for durable functions.
Lambda durable functions allow for long-running executions with persistent state.
Example
const fn = new lambda.Function(this, 'MyFunction', {
runtime: lambda.Runtime.NODEJS_24_X,
handler: 'index.handler',
code: lambda.Code.fromAsset(path.join(__dirname, 'lambda-handler')),
durableConfig: { executionTimeout: Duration.hours(1), retentionPeriod: Duration.days(30) }, // 1 hour timeout, 30 days retention
});
Properties
| Name | Type | Description |
|---|---|---|
| execution | Duration | The amount of time that Lambda allows a durable function to run before stopping it. |
| retention | Duration | The number of days after a durable execution is closed that Lambda retains its history. |
executionTimeout
Type:
Duration
The amount of time that Lambda allows a durable function to run before stopping it.
Must be between 1 and 31,622,400 seconds (366 days).
retentionPeriod?
Type:
Duration
(optional, default: Duration.days(14))
The number of days after a durable execution is closed that Lambda retains its history.
Must be between 1 and 90 days.
The underlying configuration is expressed in whole numbers of days. Providing a Duration that does not represent a whole number of days will result in a runtime or deployment error.

.NET
Go
Java
Python
TypeScript (