How to List, View and Update an AWS CloudFront Distribution

How to List, View and Update an AWS CloudFront Distribution

AWS Cloudfront is a content distribution service offered by AWS to speed up the distribution of static content, such as media files, html, js, css, etc. Cloudfront serves its content through edge locations. In Cloudfront, the content is organized into distributions. There are two types of distributions with CloudFront: (1) Download CloudFront  Distribution and (2) Streaming Distribution. When the user updates the configuration distribution, all the changes are propagated to all the edge locations. Until all the edge locations are updated with the changes, Cloudfront continues to serve the content from the previous distribution.

The present guide demonstrates how to view and update the existing Cloudfront download distribution.

1. Go to the AWS console through http://aws.amazon.com/console. Click on CloudFront.

2. The Cloudfront console lists all the available distributions.. It displays all the enabled as well as the disabled distributions. It lists the domain name of each distribution as well as the distribution type (streaming / download). Click the icon [i] of any distribution marked in the image or select one of the distributions and click on “Distribution Settings”.

3. The distribution settings view has multiple tabs. The General tab displays the following information:

a. Distribution ID: The unique ID associated with the distribution.
b. Domain name: The ID used to access the Cloudfront distribution. For streaming it will start with ‘s’, while for download it will start with ‘d’.
c. The Distribution Delivery Method: Download or Streaming.
d. Price Class: The price specified by the user as the maximum price, which the user is ready to pay for Cloudfront. Based on the selection, Cloudfront will deliver the object from the specific region.
e. CNAME: Allows the user to use URLs for objects instead of the domain name that CloudFront assigns i.e. instead of the Cloudfront distribution http://d111111abcdef8.cloudfront.net/ , the user can specify the custom URL.
f. Cookie Logging is used to allow origins other than AWS S3.
g. Comment is used to describe the distribution.
h. Distribution State when enabled allows Cloudfront to process requests as soon as the distribution is created.
i. Default Root Object serves the default root object when the user requests the root URL of the distribution (i.e. user sends request as http://mynvm.com instead of http://mynvm.com/index.html and gets the object specified as Default Root).
j. If logging is enabled, it shows the logging related information.

4. Click on the Origins tab, which lists the values for the origin. The origin specifies a location where the media file is stored and served from. Cloudfront copies the file from the origin to the edge location to reduce latency and provide faster access to the object. The origin for the download distribution can be AWS S3 or the AWS Services, such as EC2, ELB or the user’s own origin. The OriginID is the ID used to uniquely identify the origin.

5. Click on the Behaviors tab, which lists the cache behavior settings. The fields of the cache behaviors settings are:

a. Path pattern is used to apply the cache behavior to specific objects. If default (*) is selected it will forward all the requests to the bucket displayed under Origin.
b. Viewer Protocol Policy allows the end user to access objects through HTTP and HTTPS.
c. Forward Query string is used to receive different versions of the object based on a query string in the URL.

6. To update the General configuration of the existing distribution, select the General Tab and click on the “Edit” tab.

7. Update the configuration values, as specified in step #3 and then click on “Yes, Edit”.

8. To update the Origins configuration, select the “Origins” tab and click on the “Edit” button.

9. Update the origin domain name and bucket access policy if required. Click on “Yes, Edit” to save the changes.

10. Once all the changes have been applied it may take about 10-15 minutes to update the configuration across all the edge locations.

Keywords: Amazon Web Services, AWS, Amazon AWS Console, AWS S3, Amazon CloudFront, AWS CloudFront, CloudFront, AWS EC2, AWS ELB, CDN, EC2, S3, CDN Edge Location, Content Delivery Network

You must be to post a comment.

* As a bonus, you'll receive our weekly newsletter!

Hitchhiker's Guide to The Cloud

Newvem's eBook for Cloud Operations