Skip to main content

durable_execution

Attribute Macro durable_execution 

Source
#[durable_execution]
Expand description

Attribute macro that transforms an async handler into a complete durable Lambda binary.

The annotated function must:

  • Be async
  • Have exactly 2 parameters: (event: serde_json::Value, ctx: DurableContext)
  • Return Result<serde_json::Value, DurableError>

The macro preserves the original function and generates a #[tokio::main] async fn main() that sets up the Lambda runtime, AWS backend, and event parsing — mirroring the #[tokio::main] ergonomic pattern.