3 simple steps to setup React with CloudFront secured with SSL in AWS

Kevin Lu
13 min readSep 30, 2021

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:

  1. create an EC2 instance
  2. copy your React Application to the EC2 instance
  3. 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.

--

--