Lambda / Client / get_durable_execution_history
get_durable_execution_history¶
- Lambda.Client.get_durable_execution_history(**kwargs)¶
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.
See also: AWS API Documentation
Request Syntax
response = client.get_durable_execution_history( DurableExecutionArn='string', IncludeExecutionData=True|False, MaxItems=123, Marker='string', ReverseOrder=True|False )
- Parameters:
DurableExecutionArn (string) –
[REQUIRED]
The Amazon Resource Name (ARN) of the durable execution.
IncludeExecutionData (boolean) – Specifies whether to include execution data such as step results and callback payloads in the history events. Set to
trueto include data, orfalseto exclude it for a more compact response. The default istrue.MaxItems (integer) – The maximum number of history events to return per call. You can use
Markerto retrieve additional pages of results. The default is 100 and the maximum allowed is 1000. A value of 0 uses the default.Marker (string) – If
NextMarkerwas returned from a previous request, use this value to retrieve the next page of results. Each pagination token expires after 24 hours.ReverseOrder (boolean) – When set to
true, returns the history events in reverse chronological order (newest first). By default, events are returned in chronological order (oldest first).
- Return type:
dict
- Returns:
Response Syntax
{ 'Events': [ { 'EventType': 'ExecutionStarted'|'ExecutionSucceeded'|'ExecutionFailed'|'ExecutionTimedOut'|'ExecutionStopped'|'ContextStarted'|'ContextSucceeded'|'ContextFailed'|'WaitStarted'|'WaitSucceeded'|'WaitCancelled'|'StepStarted'|'StepSucceeded'|'StepFailed'|'ChainedInvokeStarted'|'ChainedInvokeSucceeded'|'ChainedInvokeFailed'|'ChainedInvokeTimedOut'|'ChainedInvokeStopped'|'CallbackStarted'|'CallbackSucceeded'|'CallbackFailed'|'CallbackTimedOut'|'InvocationCompleted', 'SubType': 'string', 'EventId': 123, 'Id': 'string', 'Name': 'string', 'EventTimestamp': datetime(2015, 1, 1), 'ParentId': 'string', 'ExecutionStartedDetails': { 'Input': { 'Payload': 'string', 'Truncated': True|False }, 'ExecutionTimeout': 123 }, 'ExecutionSucceededDetails': { 'Result': { 'Payload': 'string', 'Truncated': True|False } }, 'ExecutionFailedDetails': { 'Error': { 'Payload': { 'ErrorMessage': 'string', 'ErrorType': 'string', 'ErrorData': 'string', 'StackTrace': [ 'string', ] }, 'Truncated': True|False } }, 'ExecutionTimedOutDetails': { 'Error': { 'Payload': { 'ErrorMessage': 'string', 'ErrorType': 'string', 'ErrorData': 'string', 'StackTrace': [ 'string', ] }, 'Truncated': True|False } }, 'ExecutionStoppedDetails': { 'Error': { 'Payload': { 'ErrorMessage': 'string', 'ErrorType': 'string', 'ErrorData': 'string', 'StackTrace': [ 'string', ] }, 'Truncated': True|False } }, 'ContextStartedDetails': {}, 'ContextSucceededDetails': { 'Result': { 'Payload': 'string', 'Truncated': True|False } }, 'ContextFailedDetails': { 'Error': { 'Payload': { 'ErrorMessage': 'string', 'ErrorType': 'string', 'ErrorData': 'string', 'StackTrace': [ 'string', ] }, 'Truncated': True|False } }, 'WaitStartedDetails': { 'Duration': 123, 'ScheduledEndTimestamp': datetime(2015, 1, 1) }, 'WaitSucceededDetails': { 'Duration': 123 }, 'WaitCancelledDetails': { 'Error': { 'Payload': { 'ErrorMessage': 'string', 'ErrorType': 'string', 'ErrorData': 'string', 'StackTrace': [ 'string', ] }, 'Truncated': True|False } }, 'StepStartedDetails': {}, 'StepSucceededDetails': { 'Result': { 'Payload': 'string', 'Truncated': True|False }, 'RetryDetails': { 'CurrentAttempt': 123, 'NextAttemptDelaySeconds': 123 } }, 'StepFailedDetails': { 'Error': { 'Payload': { 'ErrorMessage': 'string', 'ErrorType': 'string', 'ErrorData': 'string', 'StackTrace': [ 'string', ] }, 'Truncated': True|False }, 'RetryDetails': { 'CurrentAttempt': 123, 'NextAttemptDelaySeconds': 123 } }, 'ChainedInvokeStartedDetails': { 'FunctionName': 'string', 'TenantId': 'string', 'Input': { 'Payload': 'string', 'Truncated': True|False }, 'ExecutedVersion': 'string', 'DurableExecutionArn': 'string' }, 'ChainedInvokeSucceededDetails': { 'Result': { 'Payload': 'string', 'Truncated': True|False } }, 'ChainedInvokeFailedDetails': { 'Error': { 'Payload': { 'ErrorMessage': 'string', 'ErrorType': 'string', 'ErrorData': 'string', 'StackTrace': [ 'string', ] }, 'Truncated': True|False } }, 'ChainedInvokeTimedOutDetails': { 'Error': { 'Payload': { 'ErrorMessage': 'string', 'ErrorType': 'string', 'ErrorData': 'string', 'StackTrace': [ 'string', ] }, 'Truncated': True|False } }, 'ChainedInvokeStoppedDetails': { 'Error': { 'Payload': { 'ErrorMessage': 'string', 'ErrorType': 'string', 'ErrorData': 'string', 'StackTrace': [ 'string', ] }, 'Truncated': True|False } }, 'CallbackStartedDetails': { 'CallbackId': 'string', 'HeartbeatTimeout': 123, 'Timeout': 123 }, 'CallbackSucceededDetails': { 'Result': { 'Payload': 'string', 'Truncated': True|False } }, 'CallbackFailedDetails': { 'Error': { 'Payload': { 'ErrorMessage': 'string', 'ErrorType': 'string', 'ErrorData': 'string', 'StackTrace': [ 'string', ] }, 'Truncated': True|False } }, 'CallbackTimedOutDetails': { 'Error': { 'Payload': { 'ErrorMessage': 'string', 'ErrorType': 'string', 'ErrorData': 'string', 'StackTrace': [ 'string', ] }, 'Truncated': True|False } }, 'InvocationCompletedDetails': { 'StartTimestamp': datetime(2015, 1, 1), 'EndTimestamp': datetime(2015, 1, 1), 'RequestId': 'string', 'Error': { 'Payload': { 'ErrorMessage': 'string', 'ErrorType': 'string', 'ErrorData': 'string', 'StackTrace': [ 'string', ] }, 'Truncated': True|False } } }, ], 'NextMarker': 'string' }
Response Structure
(dict) –
The response from the GetDurableExecutionHistory operation, containing the execution history and events.
Events (list) –
An array of execution history events, ordered chronologically unless
ReverseOrderis set totrue. Each event represents a significant occurrence during the execution, such as step completion or callback resolution.(dict) –
An event that occurred during the execution of a durable function.
EventType (string) –
The type of event that occurred.
SubType (string) –
The subtype of the event, providing additional categorization.
EventId (integer) –
The unique identifier for this event. Event IDs increment sequentially.
Id (string) –
The unique identifier for this operation.
Name (string) –
The customer-provided name for this operation.
EventTimestamp (datetime) –
The date and time when this event occurred, in ISO-8601 format (YYYY-MM-DDThh:mm:ss.sTZD).
ParentId (string) –
The unique identifier of the parent operation, if this operation is running within a child context.
ExecutionStartedDetails (dict) –
Details about an execution that started.
Input (dict) –
The input payload provided for the durable execution.
Payload (string) –
The input payload.
Truncated (boolean) –
Indicates if the error payload was truncated due to size limits.
ExecutionTimeout (integer) –
The maximum amount of time that the durable execution is allowed to run, in seconds.
ExecutionSucceededDetails (dict) –
Details about an execution that succeeded.
Result (dict) –
The response payload from the successful operation.
Payload (string) –
The result payload.
Truncated (boolean) –
Indicates if the error payload was truncated due to size limits.
ExecutionFailedDetails (dict) –
Details about an execution that failed.
Error (dict) –
Details about the execution failure.
Payload (dict) –
The error payload.
ErrorMessage (string) –
A human-readable error message.
ErrorType (string) –
The error type.
ErrorData (string) –
Machine-readable error data.
StackTrace (list) –
Stack trace information for the error.
(string) –
Truncated (boolean) –
Indicates if the error payload was truncated due to size limits.
ExecutionTimedOutDetails (dict) –
Details about an execution that timed out.
Error (dict) –
Details about the execution timeout.
Payload (dict) –
The error payload.
ErrorMessage (string) –
A human-readable error message.
ErrorType (string) –
The error type.
ErrorData (string) –
Machine-readable error data.
StackTrace (list) –
Stack trace information for the error.
(string) –
Truncated (boolean) –
Indicates if the error payload was truncated due to size limits.
ExecutionStoppedDetails (dict) –
Details about an execution that was stopped.
Error (dict) –
Details about why the execution stopped.
Payload (dict) –
The error payload.
ErrorMessage (string) –
A human-readable error message.
ErrorType (string) –
The error type.
ErrorData (string) –
Machine-readable error data.
StackTrace (list) –
Stack trace information for the error.
(string) –
Truncated (boolean) –
Indicates if the error payload was truncated due to size limits.
ContextStartedDetails (dict) –
Details about a context that started.
ContextSucceededDetails (dict) –
Details about a context that succeeded.
Result (dict) –
The JSON response payload from the successful context.
Payload (string) –
The result payload.
Truncated (boolean) –
Indicates if the error payload was truncated due to size limits.
ContextFailedDetails (dict) –
Details about a context that failed.
Error (dict) –
Details about the context failure.
Payload (dict) –
The error payload.
ErrorMessage (string) –
A human-readable error message.
ErrorType (string) –
The error type.
ErrorData (string) –
Machine-readable error data.
StackTrace (list) –
Stack trace information for the error.
(string) –
Truncated (boolean) –
Indicates if the error payload was truncated due to size limits.
WaitStartedDetails (dict) –
Details about a wait operation that started.
Duration (integer) –
The duration to wait, in seconds.
ScheduledEndTimestamp (datetime) –
The date and time when the wait operation is scheduled to complete, in ISO-8601 format (YYYY-MM-DDThh:mm:ss.sTZD).
WaitSucceededDetails (dict) –
Details about a wait operation that succeeded.
Duration (integer) –
The wait duration, in seconds.
WaitCancelledDetails (dict) –
Details about a wait operation that was cancelled.
Error (dict) –
Details about why the wait operation was cancelled.
Payload (dict) –
The error payload.
ErrorMessage (string) –
A human-readable error message.
ErrorType (string) –
The error type.
ErrorData (string) –
Machine-readable error data.
StackTrace (list) –
Stack trace information for the error.
(string) –
Truncated (boolean) –
Indicates if the error payload was truncated due to size limits.
StepStartedDetails (dict) –
Details about a step that started.
StepSucceededDetails (dict) –
Details about a step that succeeded.
Result (dict) –
The response payload from the successful operation.
Payload (string) –
The result payload.
Truncated (boolean) –
Indicates if the error payload was truncated due to size limits.
RetryDetails (dict) –
Information about retry attempts for this step operation.
CurrentAttempt (integer) –
The current attempt number for this operation.
NextAttemptDelaySeconds (integer) –
The delay before the next retry attempt, in seconds.
StepFailedDetails (dict) –
Details about a step that failed.
Error (dict) –
Details about the step failure.
Payload (dict) –
The error payload.
ErrorMessage (string) –
A human-readable error message.
ErrorType (string) –
The error type.
ErrorData (string) –
Machine-readable error data.
StackTrace (list) –
Stack trace information for the error.
(string) –
Truncated (boolean) –
Indicates if the error payload was truncated due to size limits.
RetryDetails (dict) –
Information about retry attempts for this step operation.
CurrentAttempt (integer) –
The current attempt number for this operation.
NextAttemptDelaySeconds (integer) –
The delay before the next retry attempt, in seconds.
ChainedInvokeStartedDetails (dict) –
Contains details about a chained function invocation that has started execution, including start time and execution context.
FunctionName (string) –
The name or ARN of the Lambda function being invoked.
TenantId (string) –
The tenant identifier for the chained invocation.
Input (dict) –
The JSON input payload provided to the chained invocation.
Payload (string) –
The input payload.
Truncated (boolean) –
Indicates if the error payload was truncated due to size limits.
ExecutedVersion (string) –
The version of the function that was executed.
DurableExecutionArn (string) –
The Amazon Resource Name (ARN) that identifies the durable execution.
ChainedInvokeSucceededDetails (dict) –
Details about a chained invocation that succeeded.
Result (dict) –
The response payload from the successful operation.
Payload (string) –
The result payload.
Truncated (boolean) –
Indicates if the error payload was truncated due to size limits.
ChainedInvokeFailedDetails (dict) –
Contains details about a failed chained function invocation, including error information and failure reason.
Error (dict) –
Details about the chained invocation failure.
Payload (dict) –
The error payload.
ErrorMessage (string) –
A human-readable error message.
ErrorType (string) –
The error type.
ErrorData (string) –
Machine-readable error data.
StackTrace (list) –
Stack trace information for the error.
(string) –
Truncated (boolean) –
Indicates if the error payload was truncated due to size limits.
ChainedInvokeTimedOutDetails (dict) –
Details about a chained invocation that timed out.
Error (dict) –
Details about the chained invocation timeout.
Payload (dict) –
The error payload.
ErrorMessage (string) –
A human-readable error message.
ErrorType (string) –
The error type.
ErrorData (string) –
Machine-readable error data.
StackTrace (list) –
Stack trace information for the error.
(string) –
Truncated (boolean) –
Indicates if the error payload was truncated due to size limits.
ChainedInvokeStoppedDetails (dict) –
Details about a chained invocation that was stopped.
Error (dict) –
Details about why the chained invocation stopped.
Payload (dict) –
The error payload.
ErrorMessage (string) –
A human-readable error message.
ErrorType (string) –
The error type.
ErrorData (string) –
Machine-readable error data.
StackTrace (list) –
Stack trace information for the error.
(string) –
Truncated (boolean) –
Indicates if the error payload was truncated due to size limits.
CallbackStartedDetails (dict) –
Contains details about a callback operation that has started, including timing information and callback metadata.
CallbackId (string) –
The callback ID. Callback IDs are generated by the
DurableContextwhen a durable function callsctx.waitForCallback.HeartbeatTimeout (integer) –
The heartbeat timeout value, in seconds.
Timeout (integer) –
The timeout value, in seconds.
CallbackSucceededDetails (dict) –
Contains details about a successfully completed callback operation, including the result data and completion timestamp.
Result (dict) –
The response payload from the successful operation.
Payload (string) –
The result payload.
Truncated (boolean) –
Indicates if the error payload was truncated due to size limits.
CallbackFailedDetails (dict) –
Contains details about a failed callback operation, including error information and the reason for failure.
Error (dict) –
An error object that contains details about the failure.
Payload (dict) –
The error payload.
ErrorMessage (string) –
A human-readable error message.
ErrorType (string) –
The error type.
ErrorData (string) –
Machine-readable error data.
StackTrace (list) –
Stack trace information for the error.
(string) –
Truncated (boolean) –
Indicates if the error payload was truncated due to size limits.
CallbackTimedOutDetails (dict) –
Contains details about a callback operation that timed out, including timeout duration and any partial results.
Error (dict) –
Details about the callback timeout.
Payload (dict) –
The error payload.
ErrorMessage (string) –
A human-readable error message.
ErrorType (string) –
The error type.
ErrorData (string) –
Machine-readable error data.
StackTrace (list) –
Stack trace information for the error.
(string) –
Truncated (boolean) –
Indicates if the error payload was truncated due to size limits.
InvocationCompletedDetails (dict) –
Details about a function invocation that completed.
StartTimestamp (datetime) –
The date and time when the invocation started, in ISO-8601 format (YYYY-MM-DDThh:mm:ss.sTZD).
EndTimestamp (datetime) –
The date and time when the invocation ended, in ISO-8601 format (YYYY-MM-DDThh:mm:ss.sTZD).
RequestId (string) –
The request ID for the invocation.
Error (dict) –
Details about the invocation failure.
Payload (dict) –
The error payload.
ErrorMessage (string) –
A human-readable error message.
ErrorType (string) –
The error type.
ErrorData (string) –
Machine-readable error data.
StackTrace (list) –
Stack trace information for the error.
(string) –
Truncated (boolean) –
Indicates if the error payload was truncated due to size limits.
NextMarker (string) –
If present, indicates that more history events are available. Use this value as the
Markerparameter in a subsequent request to retrieve the next page of results.
Exceptions