Hosting on AWS, React.js + Node.js app

0

I developed a web app, its frontend is made with react js and the backend is made with node js. Some data provided by clients are delivered to the backend and then they are processed and delivered again to an AWS Lambda function in order to start some additional executions. Locally everything works fine. My doubt is about the choice of the right way to host my web app: what are the instruments able to make my project hosted by aws? I read about amplify, lightsail, ec2 and so on... Can you give me some advice?

2 回答
0
已接受的回答

You can use Lightsail Node.js blueprint to deploy your frontend/backend: https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-quick-start-guide-nodejs

You can setup VPC peering to allow backend to communicate with Lambda function on your AWS account. Below page can help you with this. https://lightsail.aws.amazon.com/ls/docs/en_us/articles/lightsail-how-to-set-up-vpc-peering-with-aws-resources

In terms of whether you should choose Lightsail or EC2 for VPS hosting, it would depend on your full use-case/scale.

AWS
已回答 1 年前
  • My backend communicate with SQS, and SQS is connected with Lambda. Can I use aws sdk as I do locally in my backend in order to send messages to SQS from my React + Node app deployed on lighsail?

0

My recommendation is use S3 + cloudfront for the frontend in react and API Gateway + Lambda for the backend. You can use amplify to simplify the deployment process and create a CI/CD pipeline, but not is mandatory. Don't use lightsail, and avoid EC2 unless some backend dependency force to use it instead of lambda.

已回答 1 年前
  • Can you give me some more information about why do not use laighsail? Because it seems to me that is the right choice in order to have fixed deployment costs. And then I would like to preserve lamba concurrency to the clients requests processing. The backend in my app is only about some get and post requests and some message delivery to SQS in order to make lambdas execute. The ost of the work is made by lambda and sqs, backend is only about delivery to them.

  • Cloudfront + S3 + AWS Lambda is more cost effective than lightsail. Also if you are already using AWS Lambda in other parts of the application, use the same technology for the backend made more sense.

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

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

回答问题的准则