Deploying a React Js Application on AWS EC2

Deploying a React Js Application on AWS EC2

Testing the project locally

  1. Clone the project using following command
  2. https://github.com/Nishkarsh-chaudhary/Portfolio-website.git

  1. Initialise and start the project

npm install
npm run start        

Set up an AWS EC2 instance

  1. Create an IAM user & login to your AWS ConsoleAccess Type - PasswordPermissions - Admin
  2. Create an EC2 instanceSelect an OS image - UbuntuCreate a new key pair & download .pem fileInstance type - t2.micro
  3. Connecting to the instance using ssh

ssh -i instance.pem ubunutu@<IP_ADDRESS>        

Configuring Ubuntu on remote VM

  1. Updating the outdated packages and dependencies

sudo apt update
        

  1. Install Git - Guide by DigitalOcean
  2. Configure Node.js and npm - Guide by DigitalOcean

Deploying the project on AWS

  1. Clone this project in the remote VM

git clone https://github.com/verma-kunal/AWS-Session.git        
For this project, we'll have to set up an Elastic IP Address for our EC2 & that would be our DOMAIN

  1. Initialise and start the project

npm install
npm run start
        
NOTE - We will have to edit the inbound rules in the security group of our EC2, in order to allow traffic from our particular port

Project is deployed on AWS 🎉


To view or add a comment, sign in

More articles by Nishkarsh Chaudhary

Explore content categories