DurableConfig
Configures durable execution settings for Amazon Lambda functions. Durable functions can run for up to one year and automatically checkpoint progress, enabling long-running workflows and fault-tolerant applications. For more information about durable functions, see Lambda durable functions in the Amazon Lambda Developer Guide.
Syntax
To declare this entity in your Amazon Serverless Application Model (Amazon SAM) template, use the following syntax.
YAML
ExecutionTimeout:IntegerRetentionPeriodInDays:Integer
Properties
-
ExecutionTimeout -
The amount of time (in seconds) that Lambda allows a durable function to run before stopping it. The maximum is one 366-day year or 31,622,400 seconds.
Type: Integer
Required: Yes
Minimum: 1
Maximum: 31622400
Amazon CloudFormation compatibility: This property is passed directly to the
ExecutionTimeoutproperty of theAWS::Lambda::FunctionDurableConfigdata type. -
RetentionPeriodInDays -
The number of days after a durable execution is closed that Lambda retains its history, from one to 90 days. The default is 14 days.
Type: Integer
Required: No
Default: 14
Minimum: 1
Maximum: 90
Amazon CloudFormation compatibility: This property is passed directly to the
RetentionPeriodInDaysproperty of theAWS::Lambda::FunctionDurableConfigdata type.
Examples
DurableConfig
Durable configuration example for a function with a 1-hour execution timeout and 7-day retention period.
YAML
DurableConfig: ExecutionTimeout: 3600 RetentionPeriodInDays: 7