GetDurableExecutionHistory - AWS Lambda

GetDurableExecutionHistory

Retrieves the execution history for a durable execution, showing all the steps, callbacks, and events that occurred during the execution. This provides a detailed audit trail of the execution's progress over time.

The history is available while the execution is running and for a retention period after it completes (1-90 days, default 30 days). You can control whether to include execution data such as step results and callback payloads.

Request Syntax

GET /2025-12-01/durable-executions/DurableExecutionArn/history?IncludeExecutionData=IncludeExecutionData&Marker=Marker&MaxItems=MaxItems&ReverseOrder=ReverseOrder HTTP/1.1

URI Request Parameters

The request uses the following URI parameters.

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

IncludeExecutionData

Specifies whether to include execution data such as step results and callback payloads in the history events. Set to true to include data, or false to exclude it for a more compact response. The default is true.

Marker

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

MaxItems

The maximum number of history events 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.

ReverseOrder

When set to true, returns the history events in reverse chronological order (newest first). By default, events are returned in chronological order (oldest first).

Request Body

The request does not have a request body.

Response Syntax

HTTP/1.1 200 Content-type: application/json { "Events": [ { "CallbackFailedDetails": { "Error": { "Payload": { "ErrorData": "string", "ErrorMessage": "string", "ErrorType": "string", "StackTrace": [ "string" ] }, "Truncated": boolean } }, "CallbackStartedDetails": { "CallbackId": "string", "HeartbeatTimeout": number, "Timeout": number }, "CallbackSucceededDetails": { "Result": { "Payload": "string", "Truncated": boolean } }, "CallbackTimedOutDetails": { "Error": { "Payload": { "ErrorData": "string", "ErrorMessage": "string", "ErrorType": "string", "StackTrace": [ "string" ] }, "Truncated": boolean } }, "ChainedInvokeFailedDetails": { "Error": { "Payload": { "ErrorData": "string", "ErrorMessage": "string", "ErrorType": "string", "StackTrace": [ "string" ] }, "Truncated": boolean } }, "ChainedInvokeStartedDetails": { "DurableExecutionArn": "string", "ExecutedVersion": "string", "FunctionName": "string", "Input": { "Payload": "string", "Truncated": boolean }, "TenantId": "string" }, "ChainedInvokeStoppedDetails": { "Error": { "Payload": { "ErrorData": "string", "ErrorMessage": "string", "ErrorType": "string", "StackTrace": [ "string" ] }, "Truncated": boolean } }, "ChainedInvokeSucceededDetails": { "Result": { "Payload": "string", "Truncated": boolean } }, "ChainedInvokeTimedOutDetails": { "Error": { "Payload": { "ErrorData": "string", "ErrorMessage": "string", "ErrorType": "string", "StackTrace": [ "string" ] }, "Truncated": boolean } }, "ContextFailedDetails": { "Error": { "Payload": { "ErrorData": "string", "ErrorMessage": "string", "ErrorType": "string", "StackTrace": [ "string" ] }, "Truncated": boolean } }, "ContextStartedDetails": { }, "ContextSucceededDetails": { "Result": { "Payload": "string", "Truncated": boolean } }, "EventId": number, "EventTimestamp": number, "EventType": "string", "ExecutionFailedDetails": { "Error": { "Payload": { "ErrorData": "string", "ErrorMessage": "string", "ErrorType": "string", "StackTrace": [ "string" ] }, "Truncated": boolean } }, "ExecutionStartedDetails": { "ExecutionTimeout": number, "Input": { "Payload": "string", "Truncated": boolean } }, "ExecutionStoppedDetails": { "Error": { "Payload": { "ErrorData": "string", "ErrorMessage": "string", "ErrorType": "string", "StackTrace": [ "string" ] }, "Truncated": boolean } }, "ExecutionSucceededDetails": { "Result": { "Payload": "string", "Truncated": boolean } }, "ExecutionTimedOutDetails": { "Error": { "Payload": { "ErrorData": "string", "ErrorMessage": "string", "ErrorType": "string", "StackTrace": [ "string" ] }, "Truncated": boolean } }, "Id": "string", "InvocationCompletedDetails": { "EndTimestamp": number, "Error": { "Payload": { "ErrorData": "string", "ErrorMessage": "string", "ErrorType": "string", "StackTrace": [ "string" ] }, "Truncated": boolean }, "RequestId": "string", "StartTimestamp": number }, "Name": "string", "ParentId": "string", "StepFailedDetails": { "Error": { "Payload": { "ErrorData": "string", "ErrorMessage": "string", "ErrorType": "string", "StackTrace": [ "string" ] }, "Truncated": boolean }, "RetryDetails": { "CurrentAttempt": number, "NextAttemptDelaySeconds": number } }, "StepStartedDetails": { }, "StepSucceededDetails": { "Result": { "Payload": "string", "Truncated": boolean }, "RetryDetails": { "CurrentAttempt": number, "NextAttemptDelaySeconds": number } }, "SubType": "string", "WaitCancelledDetails": { "Error": { "Payload": { "ErrorData": "string", "ErrorMessage": "string", "ErrorType": "string", "StackTrace": [ "string" ] }, "Truncated": boolean } }, "WaitStartedDetails": { "Duration": number, "ScheduledEndTimestamp": number }, "WaitSucceededDetails": { "Duration": number } } ], "NextMarker": "string" }

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.

Events

An array of execution history events, ordered chronologically unless ReverseOrder is set to true. Each event represents a significant occurrence during the execution, such as step completion or callback resolution.

Type: Array of Event objects

NextMarker

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

Type: String

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

ResourceNotFoundException

The resource specified in the request does not exist.

HTTP Status Code: 404

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: