Using HTTPS with Amazon CloudFront - Hosting Static Websites on AWS

Using HTTPS with Amazon CloudFront

You can configure Amazon CloudFront to require that viewers use HTTPS to request your objects, so that connections are encrypted when Amazon CloudFront communicates with viewers. You can also configure Amazon CloudFront to use HTTPS to get objects from your origin, so that connections are encrypted when Amazon CloudFront communicates with your origin. If you want to require HTTPS for communication between Amazon CloudFront and Amazon S3, you must change the value of the Viewer Protocol Policy to Redirect HTTP to HTTPS or HTTPS Only.

We recommend using Redirect HTTP to HTTPS. Viewers can use both protocols. HTTP GET and HEAD requests are automatically redirected to HTTPS requests. Amazon CloudFront returns HTTP status code 301 (Moved Permanently) along with the new HTTPS URL. The viewer then resubmits the request to Amazon CloudFront using the HTTPS URL.

Amazon CloudFront reports

Amazon CloudFront includes a set of reports that provide insight into and answers to the following questions:

  • What is the overall health of my website?

  • How many visitors are viewing my website?

  • Which browsers, devices, and operating systems are they using?

  • Which countries are they coming from?

  • Which websites are the top referrers to my site?

  • What assets are the most popular ones on my site?

  • How often is CloudFront caching taking place?

Amazon CloudFront reports can be used alongside other online analytics tools, and we encourage the use of multiple reporting tools. Note that some analytics tools may require you to embed client-side JavaScript in your HTML pages. Amazon CloudFront reporting does not require any changes to your web pages. See the Amazon CloudFront Developer Guide for more information on reports.