You can create, update, or delete a distribution by completing the steps in the following topics.
This topic is about working with distributions by using the console.
If you want to create or update a distribution by using the CloudFront API, see Create Distribution or Update Distribution in the Amazon CloudFront API Reference. When you update your distribution, be aware that a number of additional fields are required that are not required to create a distribution. To help make sure that all of the required fields are included when you update your distribution by using the CloudFront API, follow the steps described in the Amazon CloudFront API Reference.
When you create a new distribution or update an existing distribution, you specify the following values.
The DNS domain name of the Amazon S3 bucket or HTTP server from which you want CloudFront to get objects for this origin. Choose the domain name in the Origin Domain Name field, or type the name. The domain name is not case sensitive.
If your origin is an Amazon S3 bucket, note the following:
If you want CloudFront to request your content from a directory in your
AWS resource or your custom origin, enter the directory
path, beginning with a slash (‘/’). CloudFront appends the
directory path to the value of Origin Domain Name, for
cf-origin.example.com/production/images. Do not
add a slash (‘/’) at the end of the path.
A string that uniquely distinguishes this origin or origin group in this distribution. If you create cache behaviors in addition to the default cache behavior, you use the ID that you specify here to identify the origin or origin group that you want CloudFront to route a request to when the request matches the path pattern for that cache behavior.
The following values are for Amazon S3 origins only (except if configured as website endpoints):
The following values are for custom origins only, such as Amazon EC2, Elastic Load Balancing, Amazon S3 buckets configured as website endpoints, or your own web server:
we recommend that you choose the latest TLS protocol that your origin supports.
The protocol policy that you want CloudFront to use when fetching objects from your origin server.
If your origin is an Amazon S3 bucket configured as a website endpoint, you must choose this option. Amazon S3 doesn’t support HTTPS connections for website endpoints.
CloudFront uses only HTTPS to access the origin.
CloudFront communicates with your origin using HTTP or HTTPS, depending on the protocol of the viewer request.
The following value is for all types of origins:
When you create a new distribution, you specify settings for the default cache behavior, which automatically forwards all requests to the origin that you specify when you create the distribution. After you create a distribution, you can create additional cache behaviors that define how CloudFront responds when it receives a request for objects that match a path pattern. If you create additional cache behaviors, the default cache behavior is always the last to be processed. Other cache behaviors are processed in the order in which they’re listed in the CloudFront console or, if you’re using the CloudFront API, the order in which they’re listed in the DistributionConfig element for the distribution.