Create a distribution
This topic explains how to use the CloudFront console to create a distribution.
Overview of creating a distribution
-
Create one or more Amazon S3 buckets, or configure HTTP servers as your origin servers. An origin is the location where you store the original version of your content. When CloudFront gets a request for your files, it goes to the origin to get the files that it distributes at edge locations. You can use any combination of Amazon S3 buckets and HTTP servers as your origin servers.
If you use Amazon S3, the name of your bucket must be all lowercase and cannot contain spaces.
If you use an Amazon EC2 server or another custom origin, review Use Amazon EC2 (or another custom origin).
For the current maximum number of origins that you can create for a distribution, or to request a higher quota, see General quotas on distributions.
-
Upload your content to your origin servers. You make your objects publicly readable, or you can use CloudFront signed URLs to restrict access to your content.
Important
You are responsible for ensuring the security of your origin server. You must ensure that CloudFront has permission to access the server and that the security settings safeguard your content.
-
Create your CloudFront distribution:
-
For a detailed procedure that creates a distribution in the CloudFront console, see Create a distribution.
-
For information about creating a distribution using the CloudFront API, see CreateDistribution in the Amazon CloudFront API Reference.
-
-
(Optional) If you use the CloudFront console to create your distribution, create more cache behaviors or origins for the distribution. For more information about behaviors and origins, see To update a CloudFront distribution.
-
Test your distribution. For more information about testing, see Test a distribution.
-
Develop your website or application to access your content using the domain name that CloudFront returned after you created your distribution in Step 3. For example, if CloudFront returns d111111abcdef8.cloudfront.net as the domain name for your distribution, the URL for the file
image.jpg
in an Amazon S3 bucket or in the root directory on an HTTP server ishttps://d111111abcdef8.cloudfront.net/image.jpg
.If you specified one or more alternate domain names (CNAMEs) when you created your distribution, you can use your own domain name. In that case, the URL for
image.jpg
might behttps://www.example.com/image.jpg
.Note the following:
-
If you want to use signed URLs to restrict access to your content, see Serve private content with signed URLs and signed cookies.
-
If you want to serve compressed content, see Serve compressed files.
-
For information about CloudFront request and response behavior for Amazon S3 and custom origins, see Request and response behavior.
-
Topics
Create a CloudFront distribution in the console
To create a distribution (console)
Sign in to the AWS Management Console and open the CloudFront console at https://console.aws.amazon.com/cloudfront/v4/home
. -
In the navigation pane, choose Distributions, then choose Create distribution.
-
Specify settings for the distribution. For more information, see Distribution settings reference.
-
Save your changes.
-
After CloudFront creates your distribution, the value of the Status column for your distribution will change from Deploying to the date and time that the distribution is deployed. If you chose to enable the distribution, it will be ready to process requests at this time.
The domain name that CloudFront assigns to your distribution appears in the list of distributions. (It also appears on the General tab for a selected distribution.)
Tip
You can use an alternate domain name, instead of the name assigned to you by CloudFront; by following the steps in Use custom URLs by adding alternate domain names (CNAMEs).
-
When your distribution is deployed, confirm that you can access your content using your new CloudFront URL or CNAME. For more information, see Test a distribution.
Values that CloudFront displays in the console
When you create a new distribution or update an existing distribution, CloudFront displays the following information in the CloudFront console.
Note
Active trusted signers, the AWS accounts that have an active CloudFront key pair and can be used to create valid signed URLs, are currently not visible in the CloudFront console.
Distribution ID
When you perform an action on a distribution using the CloudFront API, you use the
distribution ID to specify which distribution to use, for
example, EDFDVBD6EXAMPLE
. You can't change a distribution's distribution ID.
Deploying and status
When you deploy a distribution, you see the Deploying status under the Last modified column. Wait for the distribution to finish deploying and make sure the Status column shows Enabled. For more information, see Distribution state.
Last modified
The date and time that the distribution was last modified, using ISO 8601
format, for example, 2012-05-19T19:37:58Z. For more information, see https://www.w3.org/TR/NOTE-datetime
Domain name
You use the distribution's domain name in the links to your objects. For example, if
your distribution's domain name is d111111abcdef8.cloudfront.net
, the link to
/images/image.jpg
would be
https://d111111abcdef8.cloudfront.net/images/image.jpg
. You can't change the CloudFront
domain name for your distribution. For more information about CloudFront URLs for links to your
objects, see Customize the URL format for files in CloudFront.
If you specified one or more alternate domain names (CNAMEs), you can use your own domain names for links to your objects instead of using the CloudFront domain name. For more information about CNAMEs, see Alternate domain names (CNAMEs).
Note
CloudFront domain names are unique. Your distribution's domain name was never used for a previous distribution and will never be reused for another distribution in the future.
Additional links
For more information about creating a distribution, see the following links.
To learn how to create a distribution that uses an Amazon Simple Storage Service (Amazon S3) bucket origin with origin access control (OAC), see Get started with a basic CloudFront distribution.
For information about using the CloudFront APIs to create a distribution, see CreateDistribution in the Amazon CloudFront API Reference.
For information about updating a distribution (for example, to add or change cache behaviors), see Update a distribution.
To see the current maximum number of distributions that you can create for each AWS account, or to request a higher quota (formerly known as limit), see General quotas on distributions.