AWS Durable Execution SDK for Python
Project description
AWS Durable Execution SDK for Python
Build reliable, long-running AWS Lambda workflows with checkpointed steps, waits, callbacks, and parallel execution.
✨ Key Features
- Automatic checkpointing - Resume execution after Lambda pauses or restarts
- Durable steps - Run work with retry strategies and deterministic replay
- Waits and callbacks - Pause for time or external signals without blocking Lambda
- Parallel and map operations - Fan out work with configurable completion criteria
- Child contexts - Structure complex workflows into isolated subflows
- Replay-safe logging - Use
context.loggerfor structured, de-duplicated logs - Local and cloud testing - Validate workflows with the testing SDK
📦 Packages
| Package | Description | Version |
|---|---|---|
aws-durable-execution-sdk-python |
Execution SDK for Lambda durable functions | |
aws-durable-execution-sdk-python-testing |
Local/cloud test runner and pytest helpers |
🚀 Quick Start
Install the execution SDK:
pip install aws-durable-execution-sdk-python
Create a durable Lambda handler:
from aws_durable_execution_sdk_python import (
DurableContext,
StepContext,
durable_execution,
durable_step,
)
from aws_durable_execution_sdk_python.config import Duration
@durable_step
def validate_order(step_ctx: StepContext, order_id: str) -> dict:
step_ctx.logger.info("Validating order", extra={"order_id": order_id})
return {"order_id": order_id, "valid": True}
@durable_execution
def handler(event: dict, context: DurableContext) -> dict:
order_id = event["order_id"]
context.logger.info("Starting workflow", extra={"order_id": order_id})
validation = context.step(validate_order(order_id), name="validate_order")
if not validation["valid"]:
return {"status": "rejected", "order_id": order_id}
# simulate approval (real world: use wait_for_callback)
context.wait(duration=Duration.from_seconds(5), name="await_confirmation")
return {"status": "approved", "order_id": order_id}
📚 Documentation
The complete documentation for the AWS Durable Execution SDK for Python lives on the AWS Documentation site:
- AWS Durable Execution Documentation - Concepts, getting started, core operations, advanced topics, and API reference
- AWS Lambda Durable Functions Guide - How durable functions work on Lambda
💬 Feedback & Support
📄 License
See the LICENSE file for our project's licensing.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file aws_durable_execution_sdk_python-1.6.0.tar.gz.
File metadata
- Download URL: aws_durable_execution_sdk_python-1.6.0.tar.gz
- Upload date:
- Size: 217.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1d3c60dfd7164eae531b390868c281ca1d0c2a17ed061ba5b76019b4cc057d78
|
|
| MD5 |
1bf5f38bf2c056a4d08d562892681783
|
|
| BLAKE2b-256 |
e923ae9a8525e95cb9098a7a21329770843dc87f0e8406e080584dab32a19769
|
Provenance
The following attestation bundles were made for aws_durable_execution_sdk_python-1.6.0.tar.gz:
Publisher:
pypi-publish.yml on aws/aws-durable-execution-sdk-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aws_durable_execution_sdk_python-1.6.0.tar.gz -
Subject digest:
1d3c60dfd7164eae531b390868c281ca1d0c2a17ed061ba5b76019b4cc057d78 - Sigstore transparency entry: 1931076372
- Sigstore integration time:
-
Permalink:
aws/aws-durable-execution-sdk-python@bfd395930d0f95023aa1bdc8b6adb5688c7ca3ad -
Branch / Tag:
refs/tags/sdk-v1.6.0,otel-v0.2.0 - Owner: https://github.com/aws
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@bfd395930d0f95023aa1bdc8b6adb5688c7ca3ad -
Trigger Event:
release
-
Statement type:
File details
Details for the file aws_durable_execution_sdk_python-1.6.0-py3-none-any.whl.
File metadata
- Download URL: aws_durable_execution_sdk_python-1.6.0-py3-none-any.whl
- Upload date:
- Size: 98.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f96538bff3bfd9155459829590bfb31cebcde9ac149ee8819a7d6a45d12b5e8d
|
|
| MD5 |
8627e8e222bc594f76880871158a2f9e
|
|
| BLAKE2b-256 |
c73f03b4641fbe7a6b76d71f2dc12ec173887cdfb230863139f9a3ebc608bde3
|
Provenance
The following attestation bundles were made for aws_durable_execution_sdk_python-1.6.0-py3-none-any.whl:
Publisher:
pypi-publish.yml on aws/aws-durable-execution-sdk-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aws_durable_execution_sdk_python-1.6.0-py3-none-any.whl -
Subject digest:
f96538bff3bfd9155459829590bfb31cebcde9ac149ee8819a7d6a45d12b5e8d - Sigstore transparency entry: 1931076498
- Sigstore integration time:
-
Permalink:
aws/aws-durable-execution-sdk-python@bfd395930d0f95023aa1bdc8b6adb5688c7ca3ad -
Branch / Tag:
refs/tags/sdk-v1.6.0,otel-v0.2.0 - Owner: https://github.com/aws
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@bfd395930d0f95023aa1bdc8b6adb5688c7ca3ad -
Trigger Event:
release
-
Statement type: