When running API Gateway, query strings in the event object are automagically URL decoded but when using Application Load Balancer, they're not. This leads to a problem where the getQueryString function (here) ends up URL encoding ALB query strings twice. (more information can be found here)
Here's an example of what we get out when using these parameters ?single=value%20with%20spaces&multi[rise%20of%20planets]=hello%20world&multi[death%20of%20planets]=bye%20world running Laravel.
API Gateway

Application Load Balancer

From what I've found so far, there's no super clear way of figuring out if the invokation is from API Gateway or Application Load Balancer but what we could do is check the event and see if the API Gateway specific event properties are there or not and URL decode the result of the http_build_query once before returning it, if not from API Gateway. (event differences from SO)
When running API Gateway, query strings in the event object are automagically URL decoded but when using Application Load Balancer, they're not. This leads to a problem where the
getQueryStringfunction (here) ends up URL encoding ALB query strings twice. (more information can be found here)Here's an example of what we get out when using these parameters
?single=value%20with%20spaces&multi[rise%20of%20planets]=hello%20world&multi[death%20of%20planets]=bye%20worldrunning Laravel.API Gateway

Application Load Balancer

From what I've found so far, there's no super clear way of figuring out if the invokation is from API Gateway or Application Load Balancer but what we could do is check the event and see if the API Gateway specific event properties are there or not and URL decode the result of the
http_build_queryonce before returning it, if not from API Gateway. (event differences from SO)