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 |
Dynamic instrumentation plugins
Instrumentation plugins can be selected at Lambda cold start without importing them in the function artifact. Install a provider package in the function or a Lambda layer, then set an ordered allow-list:
DURABLE_EXECUTION_PLUGINS=otel-invocation,example_audit
The SDK resolves those names from the aws_durable_execution.plugins Python
entry-point group when the decorated handler is initialized. An unset or blank
variable preserves the existing behavior. The decorator's plugins argument
remains supported; explicit plugins run first and take precedence when a
dynamic provider creates the same concrete plugin type.
Provider packages expose a versioned factory:
from aws_durable_execution_sdk_python.plugin import (
DurableInstrumentationPlugin,
DurableInstrumentationPluginProvider,
)
class AuditPlugin(DurableInstrumentationPlugin):
pass
AUDIT_PLUGIN_PROVIDER = DurableInstrumentationPluginProvider(
plugin_type=AuditPlugin,
factory=AuditPlugin,
plugin_api_version=1,
)
Register the provider in the package's pyproject.toml:
[project.entry-points."aws_durable_execution.plugins"]
example_audit = "example_audit:AUDIT_PLUGIN_PROVIDER"
Set plugin_api_version to the literal API version the provider implements.
Update it only after verifying the provider against that API version.
Provider names must be unique across installed distributions. Missing,
ambiguous, incompatible, or invalid providers raise PluginLoadError during
handler initialization with the provider and distribution details.
🚀 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.
Release files for aws-durable-execution-sdk-python 2.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| aws_durable_execution_sdk_python-2.0.1.tar.gz | 320.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| aws_durable_execution_sdk_python-2.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 453.3 kB
Release files / aws_durable_execution_sdk_python-2.0.1.tar.gz
| Download URL | aws_durable_execution_sdk_python-2.0.1.tar.gz |
|---|---|
| Size | 320.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2ad9b8748d0f33d258b16a76ab6b7469057a0d1fdacfea153c232465c3f032bd
|
|
BLAKE2b-256 checksum How to use checksums |
ab0cdebdd86f78e823964195ae13ea90b800137878f04b826f453211abd479ff
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 18, 2026.
Transparency logRelease files / aws_durable_execution_sdk_python-2.0.1-py3-none-any.whl
| Download URL | aws_durable_execution_sdk_python-2.0.1-py3-none-any.whl |
|---|---|
| Size | 132.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2d223b2b5b8aaf97149bde94bcb3472780318ea4dc3a2d17260585a2d5b2368c
|
|
BLAKE2b-256 checksum How to use checksums |
f510c7869c434939b9c57f11b7b02bb59e65542703243a3a1c0aec41a8c7a2d8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 18, 2026.
Transparency log