Getting Started with Amazon CloudFront

Why Amazon CloudFront?

Amazon CloudFront is a content delivery network (CDN) that accelerates delivery of static and dynamic web content to end users.

CloudFront delivers content through a worldwide network of data centers called edge locations. When an end user requests content that you’re serving with CloudFront, the request is routed to the edge location nearest to the end user with the lowest latency.

CloudFront delivers content by leveraging the AWS global network that connects AWS edge locations to AWS Regions. Moving the network traffic along the AWS global network reduces latency and improves your application's security posture. Increase the reliability and availability of your web applications by having copies of your files cached at multiple edge locations across the globe.

How to start using CloudFront in 3 steps

1

Log in to AWS to setup CloudFront

AWS Free Tier includes 1 TB data transfer out. 10,000,000 HTTP and HTTPS requests plus 2,000,000 CloudFront Function invocations each month.

2

Create a distribution

Create an Amazon CloudFront distribution to tell CloudFront where you want content to be delivered from, and how to track and manage content delivery.

3

Start delivering content faster

Read Getting started with Amazon CloudFront to learn more about CloudFront distributions and use cases. Then, start building.

Amazon CloudFront Videos

In this section, you’ll find CloudFront videos to help you get started on your next project. You can learn more from the other customers on their CloudFront implementations and how CloudFront can support various workloads in different industry verticals.

Jim Roskind presents how to deliver great experiences with QUIC (49:03)
How Amazon Prime delivers NFL’s Thursday Night Football globally on AWS (58:23)
Building DDoS-resilient applications using AWS Shield (53:36)
Optimizing performance with CloudFront: Every millisecond matters (54:03)
Formula 1 case study: F1TV with AWS media and edge services (54:31)
HBO Max achieves scale and performance with Amazon CloudFront (56:58)
Deploying JAMStack Applications Using Amazon S3, CloudFront, and Lambda@Edge (45:59)
A deep dive on the current security threat landscape with AWS (58:21)
How to Setup Your CloudFront Distribution for EC2 Origin (9:07)
Building low-latency websites with Amazon CloudFront (53:17)
Setting up Amazon CloudFront with a WordPress Site (19:01)
Go Global: A Short Demo of Amazon CloudFront (2:05)

Frequently Asked Questions

Ready to get started with CloudFront CDN? Follow these three steps to begin:

  1. Sign up for AWS in the AWS console. Here, you can create your free AWS account and begin your journey. If you have already registered, sign in to your existing AWS account. Once signed in, you can launch your origin services, including Amazon S3 for cloud object storage, Amazon EC2 for compute, and Elastic Load Balancing.
  2. Next, you can create a CloudFront distribution to manage your content delivery across the AWS global edge network.
  3.  Finally, after getting started with Amazon CloudFront and configuring your settings, you can launch your completed CloudFront distribution.

CloudFront is a low-latency CDN. The CloudFront CDN service uses its range of edge locations across the AWS Global Network to connect users to services more securely, quickly, and efficiently.

CloudFront can help many applications deliver content, such as:

  1. Static content stored in edge locations for rapid high performance delivery.
  2. Dynamic content stored in edge locations or sent via the resilient AWS Global Network.
  3. Content that rely on low latency, fast transfer, or high customization.
  4. Reduce bandwidth consumption and lower costs through implementation of CDNs for serving website content.
  5. Reduce page load speed and improve caching server performance through content distribution networks.

CloudFront connects users to their nearest low latency edge location. This is often much closer to the user than the service’s origin server, creating a shorter journey for the content to travel. Overall, CloudFront lowers loading time for users, which means less costly data transfers for application owners and improved security at the edge by defending against DDOS and bot attacks.

CloudFront works with other AWS services and resources to deliver content via its worldwide edge locations. There are various Amazon CloudFront use cases that would benefit from using the CloudFront CDN:

  1. Applications with a global audience that want to speed up the delivery of data to users, irrespective of location.
  2. Applications that want to lower data egress costs by using the AWS Global Network for origin transfers.
  3. Applications that require low latency or near real-time data transfers across multiple locations.
  4. Applications delivering resource-heavy workloads like video streaming, APIs, or other rapidly changing dynamic content.
  5. Applications that require secure data transfers and end-to-end encryption.
  6. Applications that need additional security protections against attack and data loss.

Let's compare the CDN model to the traditional web serving model.

Suppose you are serving a graphic file from a traditional web server. Your end-users can easily navigate to a URL which returns an image, as an example. If your web server is in Seattle, Washington, USA, and an end user makes a request to this URL from Austin, Texas, USA, the request will be routed to ten different networks before the image was retrieved. While this is not an unusually high number of requests, it does illustrate how much work is needed to retrieve even a single image.

This is where CloudFront can help to distribute your data. You can dramatically decrease the routing needed if you serve this image using CloudFront. The download distribution would detect where a request is being made and copy the file to a nearby edge location.

CloudFront improves performance and latency, reducing the time it takes to load the first byte of an object. This high data transfer rate allows the same file to be delivered to another user without latency. For that user, it will be served from the same edge location. You also get increased reliability and availability because there's no longer a central point of failure. Copies of your object will now be held in edge locations around the world.

Set up a CloudFront distribution by following these steps:

  1. Sign up for AWS and sign into your account.
  2. Configure and launch your Amazon origin services.
  3. Start CloudFront by creating a distribution in your AWS Management Console.
  4. Launch your configured CloudFront distribution to begin delivering your content.

Which origin service you use will depend on your goals: