I have a front-end react App and now I want to deploy it on AWS. Can someone guide me on this? How to do it?
You can use AWS Amplify
Amplify is a suite of tools that makes it easy to build, deploy, and host your React app on AWS. It includes a hosting service, a continuous deployment service, and a number of other tools that can help you build and maintain your app.
It’s great, easy to use and it does a lot of stuff behind the scenes so doesn’t have to worry about the underlying infrastructure.
But I want to worry about the infrastructure to minimize costs and know what is going on.
I understand then you should give a try to AWS S3 and CloudFront.
Yes, you can use Amazon S3 to store the static files for your React app (such as HTML, CSS, and JavaScript files), and then use CloudFront, Amazon’s content delivery network (CDN), to serve those files to users. This is a simple and cost-effective way to host a React app, but it does not provide the same level of automation and management features as Amplify or Elastic Beanstalk.
Ok, let me try this. I like to store and read from a few environment variables (such as API keys) that I have. Here, I’m picturing the manager of a Parameter store or a Secrets. Please let me know if there is a more effective or convenient approach to save these environment variables.
Um, there are two more options.
- AWS Elastic Beanstalk: Elastic Beanstalk is a fully managed service that makes it easy to deploy and run web applications in the cloud. It can deploy a React app by creating a Node.js runtime environment and uploading your app’s code.
- Other hosting options: There are also a number of other hosting options available on AWS, including EC2 (virtual servers), ECS (container-based hosting), and Lambda@Edge (serverless hosting). You can use any of these options to host a React app, but they may require more configuration and management than the other options listed above.
I hope this helps! If you have any other questions, please don’t hesitate to ask.