Working Of CloudFront

Let’s say you have a website deployed on an EC2 instance. When a user requests the website the request goes to Cloudfront first. Here’s how the process flows :

  • Step 1: First Cloudfront checks if it already has the website content in its cache. If it does, then it sends website content directly to the user. If not it proceeds to Step 2.
  • Step 2: CloudFront fetches the website content and stores a copy in its cache for future requests. Then sends the website content to the user.

Next time if someone requests the same website then Cloudfront will deliver the content from the cache making it more efficient and fast.

Customize responses in AWS Cloudfront

Imagine you have a website with good content like images, videos, and documents. Various users visit the website. However, users who live far away from the server will face latency in accessing the website content. High latency can hamper user experience. To solve this problem CDN comes into the picture.

CDN stands for content delivery network. It is a network of interconnected servers which speeds up the webpage loading. Website content is stored on the CDN servers which is geographically closer to the user and respond to user requests more quickly. Cloudfront is AWS’s own CDN service. CloudFront integrates with other AWS services and delivers content, images, and videos with low latency and high transfer speed.

Similar Reads

CloudFront And Its Features

Cloudfront is an AWS CDN service that delivers content, images, and videos with low latency and high transfer speed....

Working Of CloudFront

Let’s say you have a website deployed on an EC2 instance. When a user requests the website the request goes to Cloudfront first. Here’s how the process flows :...

Prerequisites

Before moving to next section , it is essential to complete the following tasks for a seamless AWS setup:...

How to Customize responses in AWS Cloudfront

1) Invalidation...

Steps To Customize Error Pages

Step 1: Previously you have a s3 bucket . Upload a custom image to your S3 bucket for status code 404 ....

Steps To Configure Geographical Restriction

Step 1: Go to your Cloudfront distribution dashboard and select security , and then select Geographical restriction .Then Click edit countries ....

Conclusion

So you have now successfully learned how to customize Cloudfront service . We have started with , how to apply invalidation when there is a update in the website content, then we learned how to add multiple paths to access images and website from different paths . We also learned how to use custom error pages for different type of response status code and at last we finally learned how to restrict the website content for any particular geographical area ....

FAQs On AWS Cloudfront

1) What is edge location ?...