1
votes

I have a cloud-formation template to create API Gateway resource.

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

Everything works as expected but "Use Lambda Proxy integration" is checked. I can manually uncheck it, but how do I uncheck using cloudformation.

I tried different Integration.Type: AWS/AWS_PROXY both did not have any impact on it.

1
Did you try all types? HTTP, HTTP_PROXY, AWS, AWS_PROXY?kichik
Thanks @kichik for the response. I figured how to fix it. Please see my answer belowPraveen Alluri
Where do u see this "Use Lambda Proxy integration" - I'm searching for it to uncheckPatrick
I just found out ... it was under that API Gateway -> Choose Particular Lambda (Method execution) -> INTEGRATION Request -> Uncheck the "Use Lambda Proxy integration (check box)"Patrick

1 Answers

1
votes

I figured out why this is happening.
When I ran the stack I used AWS_PROXY. Then changing AWS_PROXY to AWS did not deploy the method. I had to rename the method and everything looks as expected.