Expand description
Durable execution invocation output formatting.
The AWS Lambda Durable Execution service requires Lambda handlers to return
a specific JSON envelope as their response, rather than the user’s plain JSON
value. This module provides wrap_handler_result to convert the handler’s
Result<serde_json::Value, DurableError> into the required format.
§Protocol
The durable execution service validates the Lambda response and expects one of:
{"Status": "SUCCEEDED", "Result": "<serialized-user-result>"}— execution completed{"Status": "FAILED", "Error": {"ErrorMessage": "...", "ErrorType": "..."}}— execution failed{"Status": "PENDING"}— execution suspended (wait/callback/retry/invoke)
The Result field in the SUCCEEDED case is a JSON string (the user’s result
value serialized to a JSON string, then included as a string field).
Functions§
- wrap_
handler_ result - Wrap a handler result into the durable execution invocation output format.