Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support SQS's special URL format #21

merged 1 commit into from Apr 17, 2019


None yet
2 participants
Copy link

commented Apr 15, 2019

Annoyingly, SQS has it's own funky special logic for its QueueUrl parameter. It's not sent as a normal parameter - instead it's used to replace the entire base endpoint for the request. This only applies to requests for a specific queue (e.g. sending/receiving messages). To illustrate:

  • An SQS ReceiveMessage request with the current specs in theory should look like
  • In reality, the correct request would be:

I.e. the queue url replaces the base endpoint. You can see the SDK logic for this here: Fortunately, the queue url actually always consists of an SQS endpoint + /{AccountNumber}/{QueueName} (see

To fix this, I just turn any QueueUrl params for the sqs spec into two extra path parameters (AccountNumber & QueueName), and then I remove the QueueUrl param entirely.

In practice, this means that:

      - name: QueueUrl
        in: query
        required: true
        description: <p>The URL of the Amazon SQS queue from which messages are received.</p> <p>Queue URLs and names are case-sensitive.</p>
        type: string

now becomes

      - in: path
        name: AccountNumber
        required: true
        description: The AWS account number
        type: integer
      - in: path
        name: QueueName
        required: true
        description: The name of the queue
        type: string

@MikeRalphson MikeRalphson merged commit e8c0e8b into APIs-guru:master Apr 17, 2019


This comment has been minimized.

Copy link

commented Apr 17, 2019

Thanks once more!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.