1

我在 AWS SAM git 项目的本期中查看此示例:https ://github.com/awslabs/serverless-application-model/issues/25

swagger: "2.0"
basePath: "/Prod"
schemes:
  - "https"
paths:
  /report:
    get:
      responses: {}
      security:
        - sigv4: []
      x-amazon-apigateway-integration:
        type: "aws_proxy"
        uri: "arn:aws:apigateway:us-east-1:lambda:path/2015-03-31/functions/arn:aws:lambda:us-east-1:<< account id >>:function:${stageVariables.LambdaFunctionName}/invocations"
        passthroughBehavior: "when_no_match"
        httpMethod: "POST"
info:
  version: "1.0"
  title: "dev-reporting-test"
securityDefinitions:
  sigv4:
    type: "apiKey"
    name: "Authorization"
    in: "header"
    x-amazon-apigateway-authtype: "awsSigv4"

我正在尝试遵循相同的模式,但我不清楚这如何与我的 SAM yaml 文件(CloudFormation 模板)的其余部分集成。我没有看到任何有关如何通过 CloudFormation 模板 SAM yaml 文件执行此操作的文档。

任何帮助,将不胜感激。

4

0 回答 0