Интеграция с лямбда-прокси - облачная информация yml не работает - PullRequest
0 голосов
/ 30 мая 2020

Это код, который я использую для своего шаблона облачной информации:

TestLambdaApi:
  Properties:
    DefinitionBody:
      definitions:
        Error:
          properties:
            errorCode:
              format: int32
              type: integer
            errorDescription:
              type: string
            timestamp:
              format: int64
              type: integer
          type: object
      info:
        title: !Sub '${AWS::StackName}-API'
      paths:
        /test:
          get:
            responses: !Include '../api-responses.yml'
            x-amazon-apigateway-integration:
              httpMethod: POST
              requestTemplates: {}
              responses: !Include '../api-gate-responses.yml'
              type: aws
              uri: !Sub 'arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:function:TestLambdaTestFunction:live/invocations'
          options: !Include '../api-cors.yml'
      swagger: 2
      x-amazon-apigateway-policy:
        Statement:
          - Action: execute-api:Invoke
            Condition:
              IpAddress:
                aws:SourceIp: !Ref 'AllowedIPs'
            Effect: Allow
            Principal: '*'
            Resource:
              - execute-api:/*
        Version: '2012-10-17'
    EndpointConfiguration: REGIONAL
    StageName: StageName
    TracingEnabled: true
  Type: AWS::Serverless::Api

Как видите, это type: aws Я читал, что простое изменение в aws_proxy добавит Интеграция лямбда-прокси, но она не работает. Есть идеи, что я делаю не так?

...