Which AWS service is best for a proxy http service (architecture strategy)


Hello all. I have a need for a small service that serves as an intermediate http proxy between my clients (mobile app) and a Database server (outside of AWS - receiving http requests). I can think of a small NodeJS function that accepts the clients' http requests, routs them to the DB server, listens for the response coming back from the DB server and sends it back to the client. The anticipated load is not much at all, maybe 1,000 such requests every day. No need for extraordinary security measures, nor load balancing or multi region CDN's and such. I mostly need this solution to bypass CORS limitation with the target DB service that requires some middle-ware and can't serve my Angular app directly from my dev machine / mobile. There is a secret token to be sent to the target DB server, that can maybe be served from this intermediate proxy service, instead of including it with the client request.

I can see multiple possibilities to implement in AWS, differ in price and implementation, and I cannot decide which would serve me best with the minimum costs (if any). Some examples I could think of:

  • AWS API GW + Lambda
  • Lambda (is it possible without the API GW service)
  • NodeJS on an EC2
  • AWS Amplify (sounds like an overkill for this usecase?)
  • Amazon LightRail (looks expensive, though?)

Please advise on the most suitable service to use, in your mind, that will bear minimum costs and be relatively easy to configure/implement.

Thank you! Mor

2 Answers
Accepted Answer

Your best solution will probably be API Gateway + Lambda functions. At the rate you specified it may even fall within the free tier (API Gateway - 1M free requests/month for the first year, Lambda functions - 1M invocations + 400,000 GBs / month always).

profile pictureAWS
answered 2 years ago
profile picture
reviewed 2 months ago
  • Thank you, Uri !


I would suggest AWS API GW - HTTP Type + Lambda.

One more possible approach to add to the above list is, AWS Application Load balancer + Target as Lambda. But as you said that you do not need load balancing I will not recommend this approach. Also, this approach will be a bit expensive when compared with API Gateway + AWS Lambda given that the AWS ALB will cost some $ per hour

answered 2 years ago
profile picture
reviewed 2 months ago
  • Thank you, Rajas!

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions