【问题标题】:Serverless framework for APIGateway deployment with HTTP endpoint invocation?用于 APIGateway 部署的无服务器框架与 HTTP 端点调用?
【发布时间】:2020-06-18 13:28:52
【问题描述】:

我正在尝试使用具有 http 端点调用的无服务器框架来实现 APIGateway 部署。

如何做到这一点?

谢谢

【问题讨论】:

    标签: amazon-web-services deployment automation aws-api-gateway serverless-framework


    【解决方案1】:

    终于,我得到了解决方案。

    functions:
      TestAPI:
        handler: handler.hello
        events:
          - http:
              path: /test
              method: get
              authorizer: aws_iam
              integration: http
              cors: false
              request:
                uri: 'http://karthibalu.simplesite.com'
                passThrough: NEVER
                template:
                  application/json: '{}'
                parameters:
                  headers:
                    X-Request-Id: false
              response:
                statusCodes:
                  200:
                    pattern: '' 
                    headers:
                      Strict-Transport-Security: "'max-age=31536000'"
                  500:
                    pattern: '500' 
                    headers:
                      Strict-Transport-Security: "'max-age=31536000'"
                      Access-Control-Allow-Origin: "'Original Url'"
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-11-08
      • 2020-02-12
      • 2019-03-02
      • 2019-08-04
      • 1970-01-01
      • 1970-01-01
      • 2020-08-21
      • 2021-10-07
      相关资源
      最近更新 更多