AWS Lambda 函数 URL 事件类型

Raj*_*ary 1 amazon-web-services typescript aws-lambda

对于使用函数 URL 托管的 Lambda 函数,@types/aws-lambda 包中的确切事件类型是什么?

fed*_*nev 5

Lambda 函数 URL 请求和响应事件使用Amazon API Gateway 负载格式版本 2.0

相应的 TypeScript 类型是@types/aws-lambdaAPIGatewayProxyEventV2包中的(request) 和APIGatewayProxyResultV2<T>(response) 。

/**
 * 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>>;
Run Code Online (Sandbox Code Playgroud)