GetDurableExecutionState - AWS Lambda

GetDurableExecutionState

Retrieves the current execution state required for the replay process during durable function execution. This API is used by the Lambda durable functions SDK to get state information needed for replay. You typically don't need to call this API directly as the SDK handles state management automatically.

The response contains operations ordered by start sequence number in ascending order. Completed operations with children don't include child operation details since they don't need to be replayed.

Request Syntax

GET /2025-12-01/durable-executions/DurableExecutionArn/state?CheckpointToken=CheckpointToken&Marker=Marker&MaxItems=MaxItems HTTP/1.1

URI Request Parameters

The request uses the following URI parameters.

CheckpointToken

A checkpoint token that identifies the current state of the execution. This token is provided by the Lambda runtime and ensures that state retrieval is consistent with the current execution context.

Length Constraints: Minimum length of 1. Maximum length of 2048.

Pattern: [A-Za-z0-9+/]+={0,2}

Required: Yes

DurableExecutionArn

The Amazon Resource Name (ARN) of the durable execution.

Length Constraints: Minimum length of 1. Maximum length of 1024.

Pattern: arn:([a-zA-Z0-9-]+):lambda:([a-zA-Z0-9-]+):(\d{12}):function:([a-zA-Z0-9_-]+):(\$LATEST(?:\.PUBLISHED)?|[0-9]+)/durable-execution/([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)

Required: Yes

Marker

If NextMarker was returned from a previous request, use this value to retrieve the next page of operations. Each pagination token expires after 24 hours.

MaxItems

The maximum number of operations to return per call. You can use Marker to retrieve additional pages of results. The default is 100 and the maximum allowed is 1000. A value of 0 uses the default.

Valid Range: Minimum value of 0. Maximum value of 1000.

Request Body

The request does not have a request body.

Response Syntax

HTTP/1.1 200 Content-type: application/json { "NextMarker": "string", "Operations": [ { "CallbackDetails": { "CallbackId": "string", "Error": { "ErrorData": "string", "ErrorMessage": "string", "ErrorType": "string", "StackTrace": [ "string" ] }, "Result": "string" }, "ChainedInvokeDetails": { "Error": { "ErrorData": "string", "ErrorMessage": "string", "ErrorType": "string", "StackTrace": [ "string" ] }, "Result": "string" }, "ContextDetails": { "Error": { "ErrorData": "string", "ErrorMessage": "string", "ErrorType": "string", "StackTrace": [ "string" ] }, "ReplayChildren": boolean, "Result": "string" }, "EndTimestamp": number, "ExecutionDetails": { "InputPayload": "string" }, "Id": "string", "Name": "string", "ParentId": "string", "StartTimestamp": number, "Status": "string", "StepDetails": { "Attempt": number, "Error": { "ErrorData": "string", "ErrorMessage": "string", "ErrorType": "string", "StackTrace": [ "string" ] }, "NextAttemptTimestamp": number, "Result": "string" }, "SubType": "string", "Type": "string", "WaitDetails": { "ScheduledEndTimestamp": number } } ] }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

NextMarker

If present, indicates that more operations are available. Use this value as the Marker parameter in a subsequent request to retrieve the next page of results.

Type: String

Operations

An array of operations that represent the current state of the durable execution. Operations are ordered by their start sequence number in ascending order and include information needed for replay processing.

Type: Array of Operation objects

Errors

For information about the errors that are common to all actions, see Common Errors.

InvalidParameterValueException

One of the parameters in the request is not valid.

message

The exception message.

Type

The exception type.

HTTP Status Code: 400

ServiceException

The AWS Lambda service encountered an internal error.

HTTP Status Code: 500

TooManyRequestsException

The request throughput limit was exceeded. For more information, see Lambda quotas.

retryAfterSeconds

The number of seconds the caller should wait before retrying.

HTTP Status Code: 429

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: