fix(testing): match service error limits (#824) Measure the whole update in UTF-8 bytes against 1,048,576 when it carries an error, instead of only the error object against 32,768. Include the error payload in history events only when execution data is requested.
fix(testing): match service error limits (#824)
Measure the whole update in UTF-8 bytes against 1,048,576 when it carries an error, instead of only the error object against 32,768.
Include the error payload in history events only when execution data is requested.
Build reliable, long-running AWS Lambda workflows with checkpointed steps, waits, callbacks, and parallel execution.
context.logger
aws-durable-execution-sdk-python
aws-durable-execution-sdk-python-testing
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}
None
The complete documentation for the AWS Durable Execution SDK for Python lives on the AWS Documentation site:
See the LICENSE file for our project’s licensing.
版权所有:中国计算机学会技术支持:开源发展技术委员会 京ICP备13000930号-9 京公网安备 11010802047560号
AWS Durable Execution SDK for Python
Build reliable, long-running AWS Lambda workflows with checkpointed steps, waits, callbacks, and parallel execution.
✨ Key Features
context.loggerfor structured, de-duplicated logs📦 Packages
aws-durable-execution-sdk-pythonaws-durable-execution-sdk-python-testing🚀 Quick Start
Install the execution SDK:
Create a durable Lambda handler:
📚 Documentation
Nonein batch resultsThe complete documentation for the AWS Durable Execution SDK for Python lives on the AWS Documentation site:
💬 Feedback & Support
📄 License
See the LICENSE file for our project’s licensing.