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 年前1830 查看次数
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!

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则