


Add a name ,description and attach the VPC which was created before. Moreover, deploying a database to AWS requires 2 subnets in different availability zones, so setup a second one with the same flow.Ī security group acts as a virtual firewall for the instance to control inbound and outbound traffic.Ĭlick on the security groups tab and click on create security group. Also, an availability zone is required to make this subnet work with our database. The web server(EC2) needs to be accessible by the internet while the RDS should only be accessed internally thus public and a private subnet is needed for security. The VPC has been named as react-node vpc.ĬIDR, is an alternative to traditional subnetting which is used to specify the number of significant bits that make up the routing or networking portion.ĬIDR Notation(10.10.0.0/16) indicates that the first two octet is for networking and the remaining 2 octet to define host.Ĭlick on create VPC button to finish the VPC setup.Ī subnet or sub network is a way to divide the resources in the VPC. Go to Amazon VPC Dashboard by using the following link Ĭlick on "Create VPC" button.Virtual Private Cloud is basically a virtual location that contains our AWS services(example: web servers, databases, elastic cache, file servers, and messaging services). However, setting up an AWS instance gives much more insights of what goes under the hood in making your website public. In the past, I had used Heroku for deploying node apps and Netlify for static web apps which provides with ready-to-use environments making the deployment process much faster and easier by hiding away all the complexities. And finally we will map the EC2 instance to a domain name. The MySQL database will be deployed to AWS RDS, phymyadmin will be setup too and connected to the rds to handle queries through GUI. The setup uses NGINX as a reverse proxy and also to serve react static files, PM2 is used as a cluster manager. We will deploy the app to an AWS EC2 instance running Ubuntu Server 16.04 LTS. We will setup a full-stack(Node, Express, React) app with MySQL database. A detailed walkthrough on setting up a production-ready web server from scratch on the Amazon EC2 service.
