Class DurableConfig
Configuration for durable functions.
Implements
Inherited Members
Namespace: Amazon.CDK.AWS.Lambda
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class DurableConfig : IDurableConfig
Syntax (vb)
Public Class DurableConfig Implements IDurableConfig
Remarks
Lambda durable functions allow for long-running executions with persistent state.
ExampleMetadata: infused
Examples
var fn = new Function(this, "MyFunction", new FunctionProps {
Runtime = Runtime.NODEJS_LATEST,
Handler = "index.handler",
Code = Code.FromAsset(Join(__dirname, "lambda-handler")),
DurableConfig = new DurableConfig { ExecutionTimeout = Duration.Hours(1), RetentionPeriod = Duration.Days(30) }
});
Synopsis
Constructors
| DurableConfig() | Configuration for durable functions. |
Properties
| ExecutionTimeout | The amount of time that Lambda allows a durable function to run before stopping it. |
| RetentionPeriod | The number of days after a durable execution is closed that Lambda retains its history. |
Constructors
DurableConfig()
Configuration for durable functions.
public DurableConfig()
Remarks
Lambda durable functions allow for long-running executions with persistent state.
ExampleMetadata: infused
Examples
var fn = new Function(this, "MyFunction", new FunctionProps {
Runtime = Runtime.NODEJS_LATEST,
Handler = "index.handler",
Code = Code.FromAsset(Join(__dirname, "lambda-handler")),
DurableConfig = new DurableConfig { ExecutionTimeout = Duration.Hours(1), RetentionPeriod = Duration.Days(30) }
});
Properties
ExecutionTimeout
The amount of time that Lambda allows a durable function to run before stopping it.
public Duration ExecutionTimeout { get; set; }
Property Value
Remarks
Must be between 1 and 31,622,400 seconds (366 days).
RetentionPeriod
The number of days after a durable execution is closed that Lambda retains its history.
public Duration? RetentionPeriod { get; set; }
Property Value
Remarks
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.
Default: Duration.days(14)