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 Answers
0
Accepted Answer

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
answered a year ago
  • 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.

answered a year ago
  • 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.

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