How can I route requests from my NodeJS API through AWS Lambda function and use it as a proxy?

Viewed 63

What I am trying to Achieve:

I want to send some requests to a third-party API from my front end which is in React. But, in order to avoid ad-block software, I am willing to create a server-side proxy that will route those requests through my API to the third-party API. Now, there are multiple thoughts I had about it.

  1. I can create an endpoint on my backend and route all the requests to the third-party API through that but I believe, it will unnecessarily add load on my server API which I am not willing to put it through.

  2. I want to create an AWS Lambda function, that will serve as a proxy for my custom NodeJS API just to handle these third-party requests from frontend.

0 Answers
Related