Next: , Previous: , Up: Getting Started with CloudFront   [Index]


Step 2—Create a CloudFront Distribution

To create a CloudFront distribution:

  1. Open the CloudFront console
  2. Choose Create Distribution.
  3. On the Select a delivery method for your content page, in the Web section, choose Get Started.

    The options are:

  4. On the Create Distribution page, for Origin Domain Name, choose the Amazon S3 bucket that you created earlier. For Origin Path, Origin ID, Restrict Bucket Access, and Origin Custom Headers, accept the default values.
    Origin Domain Name

    Specify the domain name for your origin — the Amazon S3 bucket, AWS MediaPackage channel endpoint, AWS MediaStore container endpoint, or web server from which you want CloudFront to get your web content. The files in your origin must be publicly readable if you are not using an OAI.

    The dropdown list contains the available AWS resources in the current AWS account. To use a resource from a different AWS account, type the domain name of the resource.

    Origin Path

    Optional. If you want CloudFront to request your content from a directory in your Amazon S3 bucket or your custom origin, enter the directory name here, beginning with a ‘/’. Do not include a ‘/’ at the end of the directory name.

    CloudFront appends the directory name to the value of Origin Domain Name when forwarding the request to your origin.

  5. Under Default Cache Behavior Settings, accept the default values.
    Path Pattern

    The default cache behavior only allows a path pattern of ‘*’ (forward all requests to the origin specified by Origin). To change the behavior or the routing for other requests (for example, *.jpg), add more cache behaviors after you create the distribution.

    For more information about cache behavior options,

    Viewer Protocol Policy

    The options are:

    • HTTP and HTTPS (default)
    • Redirect HTTP to HTTPS
    • HTTP only

    If you want CloudFront to allow viewers to access your web content using either HTTP or HTTPS, specify HTTP and HTTPS. If you want CloudFront to redirect all HTTP requests to HTTPS, specify Redirect HTTP to HTTPS. If you want CloudFront to require HTTPS, specify HTTPS Only.

  6. Under Distribution Settings, choose the values for your distribution.
    Alternate Domain Names (CNAMES)

    You must list any custom domain names that you use in addition to the CloudFront domain name for the URLs for your files. Specify up to 100 CNAMEs separated with commas or put each on a new line.

    You also must create a CNAME record with your DNS service to route queries for the custome domain to the CloudFront domain.

    SSL Certificate

    The options are:

    • Default CloudFront Certificate (*.cloudfront.net) — Choose this option if you want your users to use HTTPS or HTTP to access your content with the CloudFront domain name.
    • Custom SSL Certificate (example.com) — Choose this option if you want your users to access your content by using an alternate domain name. You can use a certificate stored in AWS Certificate Manager (ACM) in the US East (N. Virginia) Region.
    Default Root Object

    Optional.

    The object that you want CloudFront to return (for example, index.html) when a viewer request points to your root URL instead of to a specific object in your distribution.

    Logging

    Select whether you want CloudFront to log all viewer requests for files in your distribution. You are charged for access logs.

  7. Choose Create Distribution.
  8. After CloudFront creates your distribution, the value of the Status column for your distribution changes from In Progress to Deployed. This typically takes between 20 and 40 minutes. The domain name that CloudFront assigns to your distribution appears in the list of distributions.

Next: , Previous: , Up: Getting Started with CloudFront   [Index]