What is the exact event type from the @types/aws-lambda package for a Lambda function hosted using function URL?
The Lambda Function URL request and response events use the Amazon API Gateway payload format version 2.0.
The corresponding TypeScript types are APIGatewayProxyEventV2 (request) and APIGatewayProxyResultV2<T> (response) in the @types/aws-lambda package.
/**
* Works with HTTP API integration Payload Format version 2.0
* @see - https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-lambda.html
*/
export type APIGatewayProxyHandlerV2<T = never> = Handler<APIGatewayProxyEventV2, APIGatewayProxyResultV2<T>>;
In .NET, following request and response objects are used when using Lambda with Function URLs.
You can find similar in typescript.
Probably APIGatewayEventRequestContextV2 should be the respective one. Anyway, you can explore all the available types here at api-gateway-proxy.d.ts.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With