DurableConfig - Amazon Serverless Application Model
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

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: Integer RetentionPeriodInDays: 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 ExecutionTimeout property of the AWS::Lambda::Function DurableConfig data 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 RetentionPeriodInDays property of the AWS::Lambda::Function DurableConfig data 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