amazon-web-services - 取消选中“使用 lambda 代理集成”cloudformation
问题描述
我有一个云形成模板来创建 API Gateway 资源。
APIGateWayEQFAPIRequestGET:
DependsOn: LambdaEQFAPIPermission
Type: 'AWS::ApiGateway::Method'
Properties:
AuthorizationType: NONE
HttpMethod: GET
Integration:
Type: AWS
IntegrationHttpMethod: POST
Uri: !Join
- ''
- - 'arn:aws:apigateway:'
- !Ref 'AWS::Region'
- ':lambda:path/2015-03-31/functions/'
- !GetAtt
- LambdaEQFReportsAPIFunction
- Arn
- /invocations
IntegrationResponses:
- StatusCode: 200
ResponseTemplates:
application/json: $input.json('$.body')
RequestTemplates:
application/json: '{}'
ResourceId: !GetAtt
- APIGateWayEQFAPI
- RootResourceId
RestApiId: !Ref APIGateWayEQFAPI
MethodResponses:
- StatusCode: 200
一切都按预期工作,但选中了“使用 Lambda 代理集成”。我可以手动取消选中它,但是如何使用 cloudformation 取消选中。
我尝试了不同的 Integration.Type: AWS/AWS_PROXY 都对它没有任何影响。
解决方案
我弄清楚为什么会这样。
当我运行堆栈时,我使用了 AWS_PROXY。然后将 AWS_PROXY 更改为 AWS 并没有部署该方法。我不得不重命名该方法,一切看起来都符合预期。
推荐阅读
- grep - 是否可以将这两个 grep 查询折叠成一行命令?
- javascript - 改变到波斯日期
- powershell - 从批处理或 .cmd 文件运行 PowerShell 命令
- cups - CUPS - 如何使用 HPPaperSource 将 PDF 的第一页打印到不同的托盘?(使用 HP LaserJet M601)
- kotlin - Kotlin 在所有应用程序执行期间运行协程
- python - ModuleNotFoundError:没有名为 bs4 的模块
- python-3.x - 如何在对象的每个实例上格式化检索视图集的数据
- android - 为什么我的片段仍然被添加到后台堆栈?
- javascript - 启动 webapp 和 google 给我一个错误
- python - 当所需的 Python 安装不存在时创建没有 sudo 访问的虚拟环境