Amazon CloudFront - Part1

Utkarsh RastogiUtkarsh Rastogi
3 min read

Amazon Cloud Concepts Learning --> Day13

Amazon CloudFront

  • A web service that expedites the way user receives static and dynamic online content.

  • Through a global network of data centers known as edge locations, CloudFront distributes your content.

  • To ensure optimal performance while delivering content, a user's request for material that you are offering via CloudFront is routed to the edge location with the lowest latency (time delay).

Edge Locations in AWS are points of presence where AWS services such as CloudFront, distribute and cache data to reduce latency and improve performance for end users. The global edge network currently consists of over 410 Points of presence, including more than 400 Edge Locations.

CloudFront Origins

An origin is a place where content is kept and from which CloudFront get content to serve to viewers. Below is the list of origins.

  • S3 Bucket and Static Website Hosting via S3

  • Application Load Balancer

  • AWS Lambda Function URL

  • EC2 Instance

  • MediaStore Container or MediaPackage Channel

How we setup CloudFront to deliver content

  • In step1, you specify origin servers like S3 or own HTTP server.

  • In step2, you upload data as needed to your specified origin servers.

  • In step3, you create CloudFront distribution via providing origin server details.

  • In step4, CloudFront assigns you a domain name.

  • In step5, CloudFront sends your distribution configuration only to its all edge locations or point of presence (POPs).

Use Cases

  • Delivery of static content get accelerated via CloudFront.

  • Stream live video or provide video on demand.

  • Upon configuring HTTPS with CloudFront, secure end-to-end connections to origin servers are already established.

  • Many options for enhancing the viewing experience and content are made possible by executing serverless code at the edge, which also reduces latency.

  • In addition to utilizing signed URLs or signed cookies, you may also use Lambda@Edge to setup your CloudFront distribution to provide private content from your own custom origin.

How CloudFront deliver content to end users

  • In step1, any file that is requested by end user via your website or application.

  • In step2, by using DNS, the request is sent to the closest CloudFront Point of presence in terms of latency, or the CloudFront POP (edge location) that can best fulfil it.

  • In step3, CloudFront looks for the requested item in its cache. CloudFront gives the object back to the user if it is cached. If item is not cached it performs following options.

  1. After comparing the request with the distribution's parameters, CloudFront sends the request to your origin server for the relevant item.

  2. The item is returned to the edge location by the origin server.

  3. The item is forwarded to the user via CloudFront as soon as the first byte leaves the origin. Additionally, CloudFront caches the item so that it will be available upon request in the future.


"Thank you for reading! If you found this blog helpful, don't forget to subscribe and follow for more insightful content. Your support keeps me motivated to bring you valuable insights. Stay updated and never miss out on our latest posts. Feel free to leave comments or suggestions for future topics. Happy learning!"

https://awslearner.hashnode.dev/amazon-web-services-via-category

1
Subscribe to my newsletter

Read articles from Utkarsh Rastogi directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Utkarsh Rastogi
Utkarsh Rastogi

๐Ÿ‘จโ€๐Ÿ’ป AWS Cloud Engineer | Around 6 years of Corporate Experience | Driving Innovation in Cloud Solutions ๐Ÿ”ง Day-to-Day Tasks: Specialize in creating AWS infrastructure for Migration Projects. Leveraging services such as S3, SNS, SQS, IAM, Lambda, System Manager, Kinesis, OpenSearch, Cognito, Storage Gateway, Cloud Watch, API Gateway, AWS Event Scheduler, Secret Manager, ECS, Application Load Balancer, VPC among others. Additionally, I excel in crafting Splunk Dashboards and implementing alerting mechanisms for Cloud Watch logs to monitor failures. My approach involves constructing AWS infrastructure using the Serverless framework and Cloud Formation templates, while automating tasks through Boto3 (Python Scripting) Lambdas. ๐ŸŽฏ Passion: I am deeply passionate about continuously learning new technologies and eagerly anticipate the transformative impact of cloud computing on the tech landscape. ๐Ÿ“ง Connect: Feel free to reach out to me at awslearningoals@gmail.com. Let's connect and explore potential collaborations! https://www.linkedin.com/in/rastogiutkarsh/