目前,我使用以下内容为 RestApi 键入 lambda 函数:
import { APIGatewayProxyEvent, APIGatewayProxyResult } from 'aws-lambda';
export const handler = async (event: APIGatewayProxyEvent): Promise<APIGatewayProxyResult> => {}
这不适用于新的 AWS Gateway HTTP API,其中 HTTP 方法可以使用event.requestContext.http.method
.
我应该使用其他类型吗?