Creating a CloudFront Distribution

Lab Steps

Logging in to the Amazon Web Services Console
Creating an Amazon S3 Bucket
Creating a CloudFront Distribution
Uploading a Demo Image Gallery to the S3 Bucket
Making the S3 Files Publicly Accessible
Testing the CloudFront Distribution
Disabling a CloudFront Distribution
Deleting a CloudFront Distribution
Destroying an S3 Bucket
Need help? Contact our support team

Here you can find the instructions for this specific Lab Step.

If you are ready for a real environment experience please start the Lab. Keep in mind that you'll need to start from the first step.


Amazon CloudFront is a content delivery service (CDN). In Amazon CloudFront, the content is organized into distributions.

Each distribution has a unique domain name (e.g. that can be used to reference objects through the global network of edge locations. 

To use Amazon CloudFront:

  • Store the original versions of your files on one or more origin servers. An origin server is the location of the definitive version of an object. Origin servers could be an Amazon S3 bucket, an Amazon EC2 instance, an Elastic Load Balancer, or another remote server.
  • Create a distribution to register the origin servers with Amazon CloudFront.
  • Use your distribution’s domain name in your web pages, media player, or application. When end users request an object using this domain name, they are automatically routed to the nearest edge location for high-performance delivery of your content.



1. In the AWS Management Console search bar, enter CloudFront, and click the CloudFront result under Services:



2. To start creating a CloudFront distribution, click Create Distribution:


A two-step wizard will load.


3. In the Web section, click Get Started:


This page of the wizard has three sections:

  • Origin Settings
  • Default Cache Behavior Settings
  • Distribution Settings


4. Under Origin Settings, in the Origin Domain Name drop-down, select the S3 bucket you created in the previous lab step:


Warning: If you don't see the S3 in bucket in the origins list, manually enter the following: <name_of_the_bucket>

Leave all other fields in this and the Default Cache Behavior Settings section at their default.


5. Scroll down to Settings, and in the Price Class selection, choose Use Only North America and Europe:

Amazon CloudFront minimizes end-user latency by delivering content from its entire global network of edge locations. Price Classes let you reduce your delivery prices by excluding Amazon CloudFront’s more expensive edge locations from your Amazon CloudFront distribution. In these cases, Amazon CloudFront will deliver your content from edge locations within the locations in the price class you selected and charge you the data transfer and request pricing from the actual location where the content was delivered.

The time required for deploying a new CloudFront distribution also depends on the number of selected Edge Locations. Selecting all edge locations will take longer to deploy.


6. In the Default Root Object field, enter gallery/index.html:


CloudFront will serve the Default Root Object when the base distribution URL is requested.


7. To finish configuring your distribution, at the bottom of the page, click Create Distribution:


CloudFront immediately assigns an ID and a Domain Name to the distribution and starts updating the edge locations to serve your content:


Observe the status field, after two to three minutes, this field will change from In Progress to Deployed.

You don't need to wait for it, you can proceed to the next lab step now.



In this lab step, you configured and created a CloudFront distribution.

Validation checks
Created CloudFront Distribution that Points to Static Website

A CloudFront distribution returns a status code of 200 when visited

Amazon CloudFrontAmazon Simple Storage Service (S3)