Skip to content

Allow user to override the SQS integration #12

@theburningmonk

Description

@theburningmonk

The default integration hardcodes the MessageBody to come from the method.request.body.message. To override this I have to override the CloudFormation resource that's generated, e.g.

custom:
  apiGatewayServiceProxies:
    - sqs:
        path: /
        method: post
        queueName: {"Fn::GetAtt":[ "SQSQueue", "QueueName" ]}

resources:
  Resources:
    SQSQueue:
      Type: "AWS::SQS::Queue"

    ApiGatewayMethodPost:
      Properties:
        Integration:
          RequestParameters:
            integration.request.querystring.MessageBody: "method.request.body"

It would be good to be able to customize this, maybe along the lines of:

custom:
  apiGatewayServiceProxies:
    - sqs:
        path: /sqs
        method: post
        queueName: {"Fn::GetAtt":[ "SQSQueue", "QueueName" ]}
        messageBody: method.request.body
        cors: true

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions