RestApiEventSource
Source:
src/AWS/Lambda/RestApiEventSource.ts
Connects a REST API (v1) route to the current Lambda function.
At deploy time this layer materializes the path Resource chain, the
Method with an AWS_PROXY integration, and the API Gateway invoke
Permission for each registered route — and registers each child as a
RestApiBinding on the API so any Deployment of the same API is
ordered after them. At runtime it dispatches matching REST proxy events
to the registered handler.
Handling REST API routes
Section titled “Handling REST API routes”yield* AWS.ApiGateway.onRestApiRoute( api, { path: "/items", httpMethod: "GET" }, () => Effect.succeed({ statusCode: 200, body: JSON.stringify({ items: [] }), }),);