Skip to main content

Crate turul_a2a_aws_lambda

Crate turul_a2a_aws_lambda 

Source
Expand description

AWS Lambda adapter for turul-a2a.

Thin wrapper: converts Lambda events to axum requests, delegates to the same Router, converts responses back. Per ADR-008/ADR-009:

  • Authorizer context mapped via synthetic headers with anti-spoofing
  • Streaming supported via durable event store (D3)
  • SSE responses are buffered: task executes, events are collected, returned as one response
  • POST /message:stream executes the task within the Lambda invocation and returns all events
  • GET /tasks/{id}:subscribe replays stored events (works best for terminal tasks)

Lambda streaming is request-scoped (not persistent SSE connections). The durable event store ensures events survive across invocations. Clients reconnect with Last-Event-ID for continuation.

Structs§

AuthorizerMapping
Mapping configuration for Lambda authorizer context.
LambdaA2aHandler
Lambda handler wrapping the axum Router.
LambdaA2aServerBuilder
Builder for Lambda A2A handler.
LambdaAuthorizerMiddleware
Middleware that reads trusted authorizer context from x-authorizer-* headers.
NoStreamingLayer
Tower Layer that rejects streaming paths on Lambda.

Functions§

axum_to_lambda_response
Convert an axum response to a Lambda HTTP response.
lambda_to_axum_request
Convert a Lambda HTTP request to an axum request.