Skip to content

Lambda  >  Operations  >  checkpoint_durable_execution

checkpoint_durable_execution

Operation

checkpoint_durable_execution async

checkpoint_durable_execution(input: CheckpointDurableExecutionInput, plugins: list[Plugin] | None = None) -> CheckpointDurableExecutionOutput

Saves the progress of a durable function execution during runtime. This API is used by the Lambda durable functions SDK to checkpoint completed steps and schedule asynchronous operations. You typically don't need to call this API directly as the SDK handles checkpointing automatically.

Each checkpoint operation consumes the current checkpoint token and returns a new one for the next checkpoint. This ensures that checkpoints are applied in the correct order and prevents duplicate or out-of-order state updates.

Parameters:

Name Type Description Default
input CheckpointDurableExecutionInput

An instance of CheckpointDurableExecutionInput.

required
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None

Returns:

Type Description
CheckpointDurableExecutionOutput

An instance of CheckpointDurableExecutionOutput.

Input

CheckpointDurableExecutionInput dataclass

Dataclass for CheckpointDurableExecutionInput structure.

Attributes

checkpoint_token class-attribute instance-attribute
checkpoint_token: str | None = None

A unique token that identifies the current checkpoint state. This token is provided by the Lambda runtime and must be used to ensure checkpoints are applied in the correct order. Each checkpoint operation consumes this token and returns a new one.

client_token class-attribute instance-attribute
client_token: str | None = None

An optional idempotency token to ensure that duplicate checkpoint requests are handled correctly. If provided, Lambda uses this token to detect and handle duplicate requests within a 15-minute window.

durable_execution_arn class-attribute instance-attribute
durable_execution_arn: str | None = None

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

updates class-attribute instance-attribute
updates: list[OperationUpdate] | None = None

An array of state updates to apply during this checkpoint. Each update represents a change to the execution state, such as completing a step, starting a callback, or scheduling a timer. Updates are applied atomically as part of the checkpoint operation.

Output

CheckpointDurableExecutionOutput dataclass

The response from the CheckpointDurableExecution operation.

Attributes

checkpoint_token class-attribute instance-attribute
checkpoint_token: str | None = None

A new checkpoint token to use for the next checkpoint operation. This token replaces the one provided in the request and must be used for subsequent checkpoints to maintain proper ordering.

new_execution_state instance-attribute
new_execution_state: CheckpointUpdatedExecutionState

Updated execution state information that includes any changes that occurred since the last checkpoint, such as completed callbacks or expired timers. This allows the SDK to update its internal state during replay.