【发布时间】:2020-05-26 14:51:34
【问题描述】:
目前我使用以下内容为 RestApi 键入 lambda 函数:
import { APIGatewayProxyEvent, APIGatewayProxyResult } from 'aws-lambda';
export const handler = async (event: APIGatewayProxyEvent): Promise<APIGatewayProxyResult> => {}
这不适用于新的 AWS Gateway HTTP API,其中可以使用 event.requestContext.http.method 获取 HTTP 方法。
我应该使用其他类型吗?
【问题讨论】:
标签: amazon-web-services aws-lambda aws-api-gateway aws-http-api