High Availability Architecture on AWS CloudFront

AWS CloudFront

AWS Cloudfront is one of the leading content delivery network services or CDN ( Content Delivery Network). The CloudFront is a popular service to provide web content management and distribution service with scalable features. It processes and distributes both static and dynamic web content along other files like images, videos etc with low latency and high transfer rates.

Firstly, we need to login to our AWS CLI account from our CMD Prompt.

In my previous Article, we learnt basics of AWS CLI, like. We Installed AWS on our Local Computer, launched an EC-2 instance in it, attached an EBS volume to it. As the basics have been covered, I will directly use the commands, but for more descriptive knowledge, check out the previous article on AWS CLI !!

1] Creating an AWS EC-2 Instance

Let's start by creating an AWS EC-2 Instance of ‘Amazon Linux 2 AMI’

2] Creating an AWS EBS Volume

Now, we will create an AWS EBS Volume in the same region.

3] Attaching the AWS EBS Volume to EC-2 Instance

4] Installing HTTPD

Now we install httpd server (web-server) on our EC-2 instance. Apache HTTPD is an HTTP server daemon produced by the Apache Foundation. It is a piece of software that listens for network requests (using the Hypertext Transfer Protocol) and responds to them. With httpd, make our own web servers.

5] Partitioning attached EBS Volume

We are gonna make a partition of the drive that we have mounted and format it because whenever we take a new drive we have to format it. Once it is formatted, we will mount our main folder that is html folder (/var/www/html/) so if incase if OS gets corrupted, data will be saved in that drive and we can launch new OS and .

We Successfully formatted and mounted the partition. To check this use command __> “df -h”

6] Creating an AWS S3 Bucket

Now, for using AWS CloudFront Service, we require an Original S3 bucket where we will have all our Original Data. From this bucket, CloudFront will receive original data and it will create caches for distribution.

## Creating Cloudfront Distribution

Now, after the above steps, we are ready for deploying our AWS CloudFront Distribution. We will create a new CloudFront Distribution which will provide it with the S3 bucket containing the image.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store