Dexter
Dexter

Reputation: 131

What is the difference between Aws API endpoint types - Http vs http proxy?

Im trying to understand the AWS API Gateway http endpoint and http proxy endpoint.

At this point my understanding is that If you have an existing REST service, you can use http proxy for additional services on top of my REST service. But what should be used for regular http endpoints? Is it for regular db or web calls? How does it work?

Upvotes: 6

Views: 2104

Answers (1)

mailtobash
mailtobash

Reputation: 2477

What AWS documentation says

As documented here, with the HTTP integration you are integrating to a backend API service - you have to perform both Integration Request & Response mapping.

Whereas for HTTP_PROXY pattern, you do not have to perform the mapping. API Gateway passes the request from client to HTTP endpoint directly and similarly response from the integration back to the client.

Which one to use

For your question - if you are looking to input/output the same data that your REST service is built for, then HTTP_PROXY pattern makes sense. That is, you need the API gateway only for its non-functional capabilities such as API Key, Authorization, Throttling, Domain name, etc.

If you intend to use the integration aspects of the gateway - such as manipulate the input to your API and its output, then you can choose HTTP where you have more control over what the API expects and returns. And use all of the capabilities of the API gateway too.

Upvotes: 8

Related Questions