能否使用 CloudFormation 模板创建 API Gateway 方法而不使用 Lambda 代理函数?

0

【以下的问题经过翻译处理】 目前,一位客户正在使用CloudFormation模板创建API Gateway,并通过Lambda函数创建方法和映射。他们正在寻找一种方法,可以在不使用Lambda函数作为代理来构建方法的情况下完成这项任务。是否有CloudFormation支持在不需要额外Lambda函数的情况下创建API Gateway方法?

1 回答
0

【以下的回答经过翻译处理】 是的,你可以在CloudFormation中原生地创建这些资源,也可以使用OpenAPI(Swagger)模板。具体详情请看下面。Swagger模板可以被导入到API Gateway中,也可以在CloudFormation中引用,或在AWS SAM模板中引用。

https://docs.aws.amazon.com/zh_cn/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-method.html

https://docs.aws.amazon.com/zh_cn/apigateway/latest/developerguide/api-gateway-swagger-extensions.html

https://docs.aws.amazon.com/zh_cn/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-restapi.html

https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessapi

profile picture
专家
已回答 5 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则