2 Answers
- Newest
- Most votes
- Most comments
2
Yes you can do it in this way.
- Configure the Path Override parameter: While configuring the integration on Path Override, you need to define it like 12345678/{queueId} where 12345678 is your account id.
- Define URL PATH Parameters: You need to define URL PATH Parameters. Name queueId, Mapped from method.request.path.queueId1.
- Add HTTP headers: Expand HTTP headers and add a new Header with Name Content-Type, Mapped from 'application/x-www-form-urlencoded'.
- Add a Mapping Template: Add a Mapping Template as Content-Type application/json and template body as Action=SendMessage&MessageBody=$input.body.
Here you can find an old post about it: https://stackoverflow.com/questions/75197213/routing-message-from-aws-api-gateway-to-sqs-regarding-url-path
1
Hi,
A solution is also to use EventBridge to dynamically route to different queues as a second stage.
Best,
Didier
I was able to solve it directly through API Gateway, but I appreciate learning about your approach. I'll definitely keep it in mind for future endeavors. Thank you!
Relevant content
- asked 2 years ago

Oh, it’s working now! I was starting to think it wasn’t possible. It seems the issue was using a query string instead of a path parameter.
Thank you very much for your help!