Search code examples
amazon-web-servicesaws-api-gatewayamazon-cloudfront

AWS API gateway returns 400 error when equal ("=") is in path


AWS API gateway returns 400 error when equal ("=") is in path

Request

URL = https://some.cloudfront.net/?key=value=a

Request

Result

Result

The equal ("=") is not supported in AWS?


Solution

  • You should encode the equals character using standard URL/percent encoding, representing it as %3D instead of =.

    If you need to decode it before passing it to the underlying Lambda/API, you can use the $util.urlDecode() function in the Integration Request of your API.