Search code examples
amazon-web-servicesaws-api-gatewayhttp-proxy

Is there a way to build an HTTP proxy on AWS using API gateway for a 3rd party domain?


I'm trying to build an API proxy that forwards all endpoints and params to a 3rd party domain.

So if I make these request:

my-arn.amazonaws.com
my-arn.amazonaws.com/api
my-arn.amazonaws.com/api/resource?query=string

It should forward them as follows, respectively:

thirdparty.example
thirdparty.example/api
thirdparty.example/api/resource?query=string

Is this possible using API Gateway?


Solution

  • Yes!! it is one of the use cases why API Gateway exists.

    Im summary you just need to create your API Gateway REST API and use integration type HTTP_PROXY. You will also need to configure your mapping templates.

    You can find more information about how to do it in the Official docs.