AWS API Gateway: Pass through all parameters


I am using API Gateway in Amazon as a simple proxy to a backend api. The main reasons for using it are: a simple way to get API keys and authentication, tracking, and handling “environments”.

My problem is that, we just want to pass through all query parameters, headers, etc. to our backend and let it handle it. Then on the way back, we’d like to pass back to the client the appropriate response code from our service; not have to explicitly map them. As I understand it, you pretty much have to specify every query parameter, and if the parameters change or you add more, you need to update your api. This is sort of tedious for us during dev/test.

Is there a way to tell Gateway to just accept and pass through any query parameters, headers, etc. so that you dont have to specify them explicitly? Same question for response Status codes?


Unfortunately no there is no way to do a passthrough of all parameters, you have to state each one in the method request. Same answer for status codes.

We’ve since launched the ‘proxy’ integration for HTTP endpoints and Lambda functions that will act as a proxy for the request input and send all parameters plus the payload to the integration. For Lambda functions, there is a prebuilt JSON structure that contains all parameters and the payload, as well as request context and stage variables.

See this doc:

This is a feature request we’ve had in the past and it’s on our backlog, but no ETA at this time. I’ll take this as another +1 for both passthrough features.

Leave a Reply