'How to set non-unique query parameters for AWS SDK 3

I'm trying to use AWS SDK3's HTTPRequest and QueryParameterBag https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-dynamodb/interfaces/queryparameterbag.html

I have query parameters, and the endpoint expects "id=xxx&id=yyy&id=...". Unfortunately the queryParameterbag is a map, so I can't set these values as separate entries. If I use the array option, it becomes "id=xxx,yyy,..."

Is there a way to set the "query" part of queryParameterBag with query params with same key?

edit: another reason I also ask this is because the aws-sdk3 signer.sign for httprequest ends up using only the one id param I put into the queryparameterbag, but on the server side the signature errors out because it expected:

The Canonical String for this request should have been
GET
<path>
id=1&id=43


Solution 1:[1]

Ok, my original issue was more related to whatgot expected, the AWS signature calculation sets the canonical string to id=1&id=2 regardless of if its id=1,2 or id=1&id=2.

my issue was the incorrect options I had set in got when I updated to use sdk v3 signature signing.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 kyl