3 simple steps to setup React with CloudFront secured with SSL in AWS
Setting up and deploying a React App is a daunting task. There are various ways to do this, and there is no right way, as it depends on your needs. In this article, we will use S3 and CloudFront to serve our React Application, the infrastructure will be set up with Pulumi and everything will be deployed automatically through Bitbucket Pipelines.
Before we dive into the implementation, it would be good to understand other ways that a React Application can be deployed
Rolling out your own solution
There are many ways to implement your solution; by implementing everything yourself, you get complete control over all parts of the infrastructure and deployment. A naive implementation where we build everything “by hand” could be something along the lines of:
- create an EC2 instance
- copy your React Application to the EC2 instance
- serve it with Node.js.
This is probably the most straightforward option, and it gives an understanding of how everything works under the hood. If you want more details, please refer here. Though straightforward, there are many downsides to this naive implementation.