Skip to main content

Function: toLambdaHandler()

toLambdaHandler(app): Handler

Defined in: index.ts:55

Wrap a @ttoss/http-server App in an AWS Lambda handler.

Compared to using serverless-http directly, this adapter populates req.rawHeaders from the original API Gateway event headers before the request reaches the application. That is required because @hono/node-server (used internally by @ttoss/http-server-mcp) builds Web Request headers exclusively from req.rawHeaders — which serverless-http leaves empty — causing every header to be dropped and MCP initialize requests to fail with HTTP 406.

Parameters

ParameterType
app__module

Returns

Handler