Skip to content

Instantly share code, notes, and snippets.

@metaskills
Last active March 26, 2020 16:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save metaskills/55f9e3c7e205f6dc9db2f2a1bcd3d289 to your computer and use it in GitHub Desktop.
Save metaskills/55f9e3c7e205f6dc9db2f2a1bcd3d289 to your computer and use it in GitHub Desktop.
Query Strings Event Values w/Lambda Integration using API Gateway (REST & HTTP API) & Application Load Balancers

This solely tests array query string values since I find these the most interesting edge case. So the query string would be colors[]=blue&colors[]=red for all cases below.

API Gateway HTTP API (version 2.0)

"rawQueryString": "colors[]=blue&colors[]=red",
"queryStringParameters": { "colors[]": "blue,red" }

API Gateway HTTP API (version 1.0)

"queryStringParameters": { "colors[]": "red" },
"multiValueQueryStringParameters": { "colors[]": [ "blue", "red" ] }

Application Load Balancer

"multiValueQueryStringParameters": { "colors[]": [ "blue", "red" ] }

API Gateway REST API

"queryStringParameters": { "colors[]": "red" },
"multiValueQueryStringParameters": { "colors[]": [ "blue", "red" ] }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment