0

I'm in the midst of testing a new AWS SAM application, and I found a bug that i'm having trouble solving.

I have a route with a simple GET request

/myRoute

and this route support query params such as "mail"

so the full url looks something like this

/myroute?mail=mymail@example.com

aws is creating the proper event for me my problem lies when I have special characters inside my string params for example mymail+bonzo@example.com than what I'll actually get after aws-sam interpret the call is "mymail bonzo@example.com" with a space instead of the special character +.

Any ideas?

Yoni hodeffi
  • 103
  • 2
  • 8

1 Answers1

2

This isn't an issue with SAM, Lambda, or API Gateway. The + symbol indicates a space (see this answer on that subject). You should URL encode your query string parameters, and decode them in your Lambda. The + symbol is %2B.

Jason Wadsworth
  • 8,059
  • 19
  • 32
  • I thought when Lambda Proxy integration create event their might be some option that can deal with this. This answer is good enough though – Yoni hodeffi Jul 07 '21 at 14:54