| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Build reliable, long-running AWS Lambda workflows with checkpointed steps, waits, callbacks, and parallel execution.
| 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 |
Install the execution SDK:
pip install aws-durable-execution-sdk-pythonCreate 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}New to durable functions?
Core operations:
Advanced topics:
Architecture:
API reference:
See the LICENSE file for our project's licensing.
| Back | FazBrowse Home | New Git URL |