checkpoint_durable_execution
async
¶
checkpoint_durable_execution(
durable_execution_arn: DurableExecutionArn,
checkpoint_token: CheckpointToken,
*,
config_overrides: Optional[AsyncLambdaClientConfig] = None,
updates: Optional[OperationUpdates] = None,
client_token: Optional[ClientToken] = None,
) -> CheckpointDurableExecutionResponse
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:
-
durable_execution_arn(DurableExecutionArn) –The Amazon Resource Name (ARN) of the durable execution.
-
checkpoint_token(CheckpointToken) –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.
-
updates(Optional[OperationUpdates], default: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.
-
client_token(Optional[ClientToken], default: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.
Raises:
-
InvalidParameterValueException–One of the parameters in the request is not valid.
-
KMSAccessDeniedException–Lambda couldn't decrypt the environment variables because KMS access was denied. Check the Lambda function's KMS permissions.
-
KMSDisabledException–Lambda couldn't decrypt the environment variables because the KMS key used is disabled. Check the Lambda function's KMS key settings.
-
KMSInvalidStateException–Lambda couldn't decrypt the environment variables because the state of the KMS key used is not valid for Decrypt. Check the function's KMS key settings.
-
KMSNotFoundException–Lambda couldn't decrypt the environment variables because the KMS key was not found. Check the function's KMS key settings.
-
ServiceException–The Lambda service encountered an internal error.
-
TooManyRequestsException–The request throughput limit was exceeded. For more information, see Lambda quotas.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_lambda/_services/async__lambda.py
2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 | |