Using @aws-sdk/signature-v4-multi-region with GET and querysttingss #6867
-
Hello! I am converting from using aws4 (npm package) to @aws-sdk/signature-v4-multi-region to sign my requests with sigv4 (and eventually sigv4a). I have working signing code that works with GET and POST requests to a sigv4 enabled endpoint. The problem is when I add a query string like ?foo=bar to my GET request I get signature failures. In aws4 package he built a bunch of custom stuff to handle this but I’m curious if there’s a way to do this with the supported signing packages?
code is pretty straight forward? Not sure how to add support when someone uses this for a request with query strings though? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
I have tried adding to the HttpRequest with stuff like |
Beta Was this translation helpful? Give feedback.
-
Alright so this was just me being dumb...
|
Beta Was this translation helpful? Give feedback.
-
Hello! Reopening this discussion to make it searchable. |
Beta Was this translation helpful? Give feedback.
Alright so this was just me being dumb...
path:
${url.pathname}${url.search},
was the issue... this was a byproduct of the switch fromaws4
package... I just dropped the url.search off and moved it into query param:query: Object.fromEntries(url.searchParams.entries()) || undefined,