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

0

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
  • 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

mor
已提問 2 年前檢視次數 1831 次
2 個答案
2
已接受的答案

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
專家
Uri
已回答 2 年前
profile picture
專家
已審閱 1 個月前
  • Thank you, Uri !

1

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

Rajas
已回答 2 年前
profile picture
專家
已審閱 1 個月前
  • Thank you, Rajas!

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南