durable_execution_states
Creates, updates, deletes, gets or lists a durable_execution_states resource.
Overview
| Name | durable_execution_states |
| Type | Resource |
| Id | aws.lambda.durable_execution_states |
Fields
The following fields are returned by SELECT queries:
- get_durable_execution_state
| Name | Datatype | Description |
|---|---|---|
callback_details | object | Contains details about a callback operation in a durable execution, including the callback token and timeout configuration. |
chained_invoke_details | object | Contains details about a chained function invocation in a durable execution, including the target function and invocation parameters. |
context_details | object | Details about the context, if this operation represents a context. |
end_timestamp | string (date-time) | The date and time when the operation ended, in ISO-8601 format (YYYY-MM-DDThh:mm:ss.sTZD). |
execution_details | object | Details about the execution, if this operation represents an execution. |
id | string | The unique identifier for this operation. (pattern: <code>[a-zA-Z0-9-_]+</code>) |
name | string | The customer-provided name for this operation. (pattern: <code>[\x20-\x7E]+</code>) |
parent_id | string | The unique identifier of the parent operation, if this operation is running within a child context. (pattern: <code>[a-zA-Z0-9-_]+</code>) |
start_timestamp | string (date-time) | The date and time when the operation started, in ISO-8601 format (YYYY-MM-DDThh:mm:ss.sTZD). |
status | string | The current status of the operation. (STARTED, PENDING, READY, SUCCEEDED, FAILED, CANCELLED, TIMED_OUT, STOPPED) |
step_details | object | Details about the step, if this operation represents a step. |
sub_type | string | The subtype of the operation, providing additional categorization. (pattern: <code>[a-zA-Z0-9-_]+</code>) |
type | string | The type of operation. (EXECUTION, CONTEXT, STEP, WAIT, CALLBACK, CHAINED_INVOKE) |
wait_details | object | Details about the wait operation, if this operation represents a wait. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_durable_execution_state | select | durable_execution_arn, CheckpointToken, region | Marker, MaxItems | 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. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
CheckpointToken | string | 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. |
durable_execution_arn | string | The Amazon Resource Name (ARN) of the durable execution. |
region | string | AWS region (default: us-east-1) |
Marker | string | 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 | integer | 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. |
SELECT examples
- get_durable_execution_state
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.
SELECT
callback_details,
chained_invoke_details,
context_details,
end_timestamp,
execution_details,
id,
name,
parent_id,
start_timestamp,
status,
step_details,
sub_type,
type,
wait_details
FROM aws.lambda.durable_execution_states
WHERE durable_execution_arn = '{{ durable_execution_arn }}' -- required
AND CheckpointToken = '{{ CheckpointToken }}' -- required
AND region = '{{ region }}' -- required
AND Marker = '{{ Marker }}'
AND MaxItems = '{{ MaxItems }}'
;