durable-execution-sdk-js.durableexecutionclient.getexecutionstate.md
December 2, 2025 ยท View on GitHub
Home > @aws/durable-execution-sdk-js > DurableExecutionClient > getExecutionState
DurableExecutionClient.getExecutionState() method
Retrieves the current execution state for a durable execution.
This method fetches the persisted state data from the durable execution backend, including step history, checkpoint data, and execution metadata. It's primarily used during replay scenarios to restore the execution context and determine which operations have already been completed.
The execution state contains all information needed to resume a durable function from where it left off, enabling fault tolerance and long-running workflows.
Signature:
getExecutionState(params: GetDurableExecutionStateRequest, logger?: DurableLogger): Promise<GetDurableExecutionStateResponse>;
Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
params |
GetDurableExecutionStateRequest |
Request parameters including execution ARN and state identifiers |
|
logger |
(Optional) Optional logger instance for operation logging and debugging |
Returns:
Promise<GetDurableExecutionStateResponse>
Promise resolving to the execution state response containing step history, checkpoint data, and execution metadata
Exceptions
Will throw an error if the execution state cannot be retrieved due to network issues, authentication problems, or invalid execution ARN