API网关创建

时间:2018-11-23 06:38:38

标签: amazon-web-services

如何在没有lambda代理集成的情况下云化API网关资源,

需要在sam模板中指定的位置,我正在使用sam模板为Node js应用程序创建具有lambda函数的API网关集成

请在下面找到代码

AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Globals:
  Api:
    Cors: "'*'"
Description: A starter AWS Lambda function.....
Parameters:
  ProjectId:
    Type: String
    Description: AWS CodeStar projectID used to associate new resources to team members
  Environment:
      Type: String
      Description: AWS CodeStar projectID used to associate new resources to team members
Resources:
  helloworld:
    Type: AWS::Serverless::Function
    Properties:
      FunctionName: rlsc-helloworld
      Handler: index.handler
      Runtime: nodejs6.10
      CodeUri: ./Lambda/testDeployLambda/
      Description: A starter AWS Lambda function.
      MemorySize: 128
      Timeout: 3
      Events:
         ApiGateway:
                    Type: Api
                    Properties:
                        Path: /hello
                        Method: post

如何给参数设置默认情况下应使“我的集成请求”取消选中“使用Lambda代理集成”

0 个答案:

没有答案