3
votes

I am trying to use AWS API Gateway to proxy requests to some REST endpoints I have running in docker containers. I set up my API Gateway method for integration type HTTP and checked 'Use HTTP Proxy integration', But this is not simply proxying my requests, it strippes out the path parameters, query string parameters and body, and makes me map them to something.

Am I missing something, I don't want API gateway transforming my request I just want it to proxy it back to my internal REST endpoints.

FYI I am using a swagger doc to generate the API Gateway structure (their UI is quite annoying)

I read about {proxy+} endpoints which sound like what I want, but how do I define swagger docs about a certain endpoint action, or have granular apikey and authorizors on my endpoints?

1

1 Answers

0
votes

You can set authorization only for resources and methods

. For example, we have the following API structure:

/
 /test
   GET              (1)
   PUT
/test/new           (2)
   ANY
/example/{proxy+}
   GET              (3)

1) For method

site.com/test endpoint

in GET method if you try to use the same key in PUT method you cath error.

2) For resource

site.com/test/new endpoint

in all methods in /test/new, but if you try to GET on /test/new/new2 you cath the error.

3) For resource(with proxy)

site.com/example/{proxy+} endpoint

You can auth to any example/* path.