Deploying WebPage Using Power Of Cloud Front

Gupta Aditya
4 min readOct 28, 2020

--

So hey guys how you all are doing good in today's article we are going to see how to deploy our own web page using the power of CloudFront that is one of the products of AWS.

Guys in this article we are going to refer to lots of things from my old article so please be sure that you have read it the link is provided below in case you have missed it.

In the last article, we have left off at the place where we launched the instance and attach one extra drive to it now let's move ahead.

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 that is done we will install httpd service and then we will mount our main folder that is html folder so if incase my os got corrupted then my data will be saved in that drive and we can launch new os.

In the above image, we use fdisk -l to see attached disk in our system and to make partition of disk use fdisk disk name.

Once the partition is created use mkfs.ext4 partition name command to format the partition as we have done in the above image.

Once this is done use yum install httpd to download httpd server it is one of the products provided by apache to make our own web server once this is downloaded use systemctl start httpd and systemctl enable httpd to make httpd start permanently.

Once we have set up the httpd server then we have to mount the main folder that is html folder because all the data inside that folder is important for us to mount the folder use mount partition name folder path as we have used in the below image.

To check which folder is mounted to which disk use df -h.

Now inside our website we use images and videos to make it more appealing and suppose we have deployed our instance in Mumbai and our client is viewing our website from Newzeland they have to face latency issue for sure because we can not anticipate from our user gona see our site so for that we use one product that is called cloud front content delivery network it is connected with its small data center that is only accessible via cloud front basically what id do that when a client from anywhere in the world visit to website content like image and videos come from CDN it make a cache of that data so when user come they have to face low latency issue and this network is connected via was global accelerator service means they don't rely on your internet they have their own networks Cloud frot is only they need origin from where they can take data so here we are using AWS s3.

aws s3api create-bucket --bucket my-bucket --region us-east-1
aws cloudfront create-distribution --origin-domain-name bucket name 

Guys, here we come to the end of this blog I hope you all like it and found it informative.

Guys follow me for such amazing blogs and if have any review then please let me know I will keep those points in my mind next time while writing blogs. If want to read more such blog to know more about me here is my website link https://sites.google.com/view/adityvgupta/home.Guys Please do not hesitate to keep 👏👏👏👏👏 for it (An Open Secret: You can clap up to 50 times for a post, and the best part is, it wouldn’t cost you anything), also feel free to share it across. This really means a lot to me.

--

--

No responses yet