AWS Certification: Cloudfront Essentials, Tips, and References

94 views August 9, 2016 scriptcrunch 3

Cloudfront is a low-latency content delivery network (CDN) service provided by AWS. Like any other CDN services, Cloudfront will distribute and deliver files all over the world using different AWS datacenters or edge locations.

Cloudfront Essentials, Tips, and References

In this article, we have explained the CloudFront essentials, tips, and references that would help you in preparing for the AWS certifications.

Cloudfront Terminologies

To understand CloudFront, you need to know about the following terminologies.

  1.  Edge Location: An edge location is an amazon facility where your content will be cached. CloudFront edge locations are present all major the world. Contains over 50 edge locations spread across the world.
  2. Origin: An origin is a place where your original files that have to be served are present. An origin could be a web server (outside AWS), ec2 instance, s3, ELB, Route   another other storage which is accessible through the internet.
  3. Distribution: This is the name of the CDN which consists of several edge locations for your content distribution. Basically, this would be a unique URL for your content distribution.
    1. Web Distribution: Used typically for websites.
    2. RTMP: Typically for streaming media which supports Adobe flash media server RTMP protocol.

Object Caching

Following are the things you should know about object caching.

  1. The object cache time totally depends on the TTL you give while creating a distribution.
  2. You can also delete the cache, for which you will be charged.

Note: Let’s say, your video is cached and you uploaded a new version of it. Until the TTL period, CloudFront will service the old version. Once the TTL expires, CloudFront will request the new version for caching.

Key Points

  1. You can create multiple origins per distribution.
  2. Each origin id should be unique to distinguish between same origins in a distribution.
  3. CloudFront Signed URL’s or cookies are used to restrict resource access to specific users.
  4. You can use AWS WAF ACL’s to restrict access to the CloudFront content.
  5. You can log CloudFront access logs to s3.
  6. You can use the geo restriction feature to restrict or allow your content access.

Cloudfront Use Cases

Following are the few use cases for which you could leverage CloudFront for content distribution.

  1. Serving Website Content: Top service static and dynamic content of a website.
    1. You could either use a single origin for both static or dynamic content.
    2. Or, create two different origins for static and dynamic content. This way you get granular management of your content delivery.
    3. CloudFront caches your content at each edge location.
    4. It proxies the request for all your interactive or dynamic content managed through CloudFront. Once the content is delivered , the user request will go through the edge location server to your origin server. This improves speed and losers latency in accessing the content.
    5. You can also make use of CloudFront to upload content to your origin server. This will make use of AWS network for uploading by proxying the request at edge location.
    6. It supports file upload up to 20 GB size.
    7. You can also use CloudFront to deliver your API’s.
  2. Serving Downloadable Softwares: You can deliver downloadables and software updates using CloudFront. If your user base is located worldwide, CloudFront would reduce the latency.
  3. Serving Streaming Data:  You can also service streaming data through Cloudfront. It could be pre-recorded, on-demand progressive download or a live streaming event.

Reference Architecture

To have an overview of how CloudFront fits in with application, you can refer this -> Cloudfront reference architecture

Take a look at the following image to know howCloudFrontt works.

how cloudfront works

source: www.aws.amazon.com




Was this helpful?