Hello friends! In this short article, I will be walking you through the process of how I deployed a static website on AWS using auto-scaling groups and elastic load balancing to ensure high availability and fault tolerance. This project was accomplished by following a tutorial series on the AOS Notes YouTube channel. You can access that here: 👉 https://lnkd.in/eu6V_mG6
This article is only an overview of the steps involved in realizing this project, I wouldn't be going into details as that can be accessed from the video series.
Above is the architecture diagram I designed for this project. It shows all the AWS resources we will use and how they are connected together.
Create a VPC with 2 public and 2 private subnets distributed over 2 availability zones for high availability.
Attach an Internet Gateway(IGW) to the public subnets for the instances to be accessed over the Internet. Don't forget to add a route to the IGW in the public subnet's route table.
Create NAT gateways for the instances in the private subnet to access the internet for software updates
Create an Auto Scaling Group (ASG) that will launch instances in the private subnet and add scaling policies to dynamically add or remove instances based on CPU utilization.
The instances are pre-configured with user data to get the static web pages from an s3 bucket and are placed in a directory that will be served by the web server
Create a load balancer that is attached to the ASG that will help to distribute the traffic across instances behind the ASG.
Once all that is done, your project should be live and working 🥳 Told you it was going to be a short one right? Please do well to check out the YouTube Playlist as well.