Monitoring CloudFront with CloudWatch

The course is part of these learning paths

Solutions Architect – Professional Certification Preparation for AWS
course-steps 45 certification 6 lab-steps 19 quiz-steps 5 description 2
Certified Developer – Associate Certification Preparation for AWS
course-steps 27 certification 5 lab-steps 22 description 2
AWS Networking & Content Delivery
course-steps 7 certification 2 lab-steps 5
AWS Advanced Networking – Specialty Certification Preparation
course-steps 18 certification 1 lab-steps 8 quiz-steps 4
Operations on AWS
course-steps 6 certification 2 lab-steps 3
more_horiz See 3 more

Contents

keyboard_tab
play-arrow
Start course
Overview
DifficultyIntermediate
Duration32m
Students4833
Ratings
4.8/5
star star star star star-half

Description

Amazon CloudFront is a content delivery web service which integrates with other Amazon Web Services products to give you an easy way to distribute content to end users with low latency, high data transfer speeds, and no minimum usage commitments.

During this course we will cover a range of topics from an introduction to what CloudFront is, to architectural considerations, to pricing and reports. We will then do a walkthrough of creating a Web Distribution, during which we will consider security and best practices. After the creation of the Web Distribution we will start monitoring CloudFront with CloudWatch to ensure that our setup is suitable for our needs and to gather valuable information about our distribution. At the very end of this course we will provide an overview of general best practices.

In order to keep up with this course you should be familiar with the core services that AWS provides and best practices for working with the platform. If you need to get up to speed on this, you can start with the AWS Fundamentals series. This is an intermediate level course, and it is recommended that you also have some basic knowledge about CloudFront prior to start, but we will present a general overview as we get started.

If you have thoughts or suggestions for this course, please contact Cloud Academy at support@cloudacademy.com.

Transcript

Now that we have set up our web distribution and confirmed that it's working, we'll need to look at reporting and analytics as they relate to our distribution.

From the CloudFront dashboard, you'll notice at the left-hand side is a menu section called Reports & Analytics. The first item we will look at is Cache Statistics. Before we get into the detail contained within this section, you'll notice that we have the ability to filter by specifying a start and end date. But note that we can only go back 60 days for daily viewing, and 14 days for hourly viewing of information. To select the level of detail, we click the drop-down on the Granularity field. We can also narrow down the viewer locations to specific regions, and then specify a single web distribution or all web distributions.

If you make any changes to these values, be sure to click the Update button. If you want to export this to analyze on your own computer, you can download it as a CSV file. This report shows the total number of requests for all HTTP status codes and all methods. You'll note that it provides some summary details at the bottom of the chart showing average, total, maximum, and minimum requests for the report period.

This report shows hits, misses, and errors as a percentage of total viewer requests. A hit is when the request for which the object was in the CloudFront edge cache. A miss is where the object wasn't in the cache, so it had to be retrieved from the origin server. Error, as the name suggests, means that the request resulted in an error. More details can be viewed in the access logs.

This report shows the total bytes for objects served by CloudFront, and the number of bytes served by misses that were not in the cache at the time of the request.

This report shows the number of requests by HTTP status codes, shown as a percentage for the total number of viewer requests. For a quick refresher, remember that HTTP 200 error codes mean success, HTTP 300 error codes are redirections, HTTP 400 codes are client site errors, and HTTP 500 codes are server side errors.

This report shows viewer GET requests that didn't finish downloading the requested object as a percentage of total requests. The reasons for GET requests not downloading are usually due to the user canceling the request, closing the browser, or clicking on another request.

This report lists the 50 most popular objects and statistics about the objects, including the number of requests for the object, the number of hits and misses, the hit ratio, the number of bytes served for misses, the total bytes served, the number of incomplete downloads, and the number of requests by HTTP status codes. If you want additional information about what each of the column headings mean, click on the show details which will provide detailed explanations.

This report provides the top 25 referrers, the number of requests from a referrer, and the total number of requests from a referrer as a percentage of the total number of requests. The usage reports consist of number of requests, which shows the number of HTTP and HTTPS requests. Below the graph, there is a summary of the data by total, average, and minimum and maximum requests, data transferred by protocol which shows the volume of data transferred by HTTP and HTTPS. Below the graph, there is a summary of the volume of data by total, average, and minimum and maximum data amount, and data transferred by destination which shows the volume of data transfer from CloudFront to your users for GET and HEAD requests. From CloudFront to your origin for DELETE, OPTIONS, PATCH, POST, and PUT requests, and data transferred from CloudFront to your users in response to DELETE, OPTIONS, PATCH, POST, and PUT requests. Below the graph, there is a summary of the volume of data by total, average, and minimum and maximum data amount.

This I find to be the most interesting of all the reports, as it shows information about the users who are accessing your content. You'll notice that there are four tabs. The first of these is Devices, which you can view as a bar chart or pie chart. This will break down the devices among desktop, mobile, tablet, TV, bot/crawler, or unknown, or empty if the User-Agent HTTP is not associated with a standard device or is empty. The bottom report shows the device trends over time to give you a historical view.

The next tab is Browsers, which you can also view as a bar chart or pie chart and identifies the browser that was used to access your content. This also has a browser trends over time to give you a historical view.

The next tab is Operating System, which you can also view as a bar chart or pie chart, and provides the details of the operating system that was used to access your content. This also includes operating system trends over time to give you a historical view.

The final tab is Location, which shows the location and request count which is also shown as a percentage. If you recall from earlier lessons, we discussed price classes. Based on this information, you could determine if you need to change the edge locations to manage cost and also performance by assuring the content is cached closest to your users.

About the Author

Students9388
Courses2
Learning paths1

David's acknowledged hands on experience in the IT industry has seen him speak at international conferences, operate in presales environments and conduct actual design and delivery services.

David also has extensive experience in delivery operations. David has worked in the financial, mining, state government, federal government and public sectors across Asia Pacific and the US