Search code examples
integrationaws-api-gatewayamazon-iam

Adding requests on aws-api-gateway to aws-sqs through an integration, failures even though "version" is specified


I've an AWS Api-Gateway resource that I tried configuring to add a message to AWS-SQS, however when I try sending a request to the api I get a response:

{
  "Error": {
      "Code": "MissingParameter",
      "Message": "Version is missing.",
      "Type": "Sender"
  },
  "RequestId": "the-multicharacter-request-id-blah-blah"
}

I have linked the two services in the integration taband the permissions policy is the below:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Action": [
                "sqs:*"
            ],
            "Effect": "Allow",
            "Resource": "*"
        }
    ]
}

I've tried adding in api-gateway permissions to the policy, adding a Version parameter in the header, starting the setup from scratch again.

Is there something I'm missing?


Solution

  • 'Version' here specifies which version of 'SQS' service to use and should be specified as a query parameter and not the header e.g.:

    ?Version='2019-05-09'
    

    'Version' specified in the policy refers to the version of the policy language.

    This was a case of RTFM.