Configure distributions
You create an Amazon CloudFront distribution to tell CloudFront from where you want content to be delivered, and the details about how to track and manage content delivery.
You can create CloudFront multi-tenant distributions with settings that can be reused across multiple distribution tenants. With a multi-tenant distribution, you can have CloudFront configure your distribution settings for you, based on your content origin type. For more details about the preconfigured settings, see CloudFront multi-tenant distribution reference. You can also create distributions with settings that can be reused across multiple distribution tenants. For more information, see Understand how multi-tenant distributions work. Alternatively, you can use a standard distribution and manually configure your own distribution settings.
The following settings can be configured:
-
Your content origin—The Amazon S3 bucket, AWS Elemental MediaPackage channel, AWS Elemental MediaStore container, Elastic Load Balancing load balancer, or HTTP server from which CloudFront gets the files to distribute. You can specify any combination of up to 25 origins for a single distribution.
-
Access—Whether you want access to the files to be available to everyone or restricted to some users.
-
Security—Whether you want to enable AWS WAF protection and require users to use HTTPS to access your content. For multi-tenant distributions, only AWS WAF V2 web access control lists (ACLs) are supported.
-
Cache key—Which values, if any, you want to include in the cache key. The cache key uniquely identifies each file in the cache for a given distribution.
-
Origin request settings—Whether you want CloudFront to include HTTP headers, cookies, or query strings in requests that it sends to your origin.
-
Geographic restrictions—Whether you want CloudFront to prevent users in selected countries from accessing your content.
-
Logs—Whether you want CloudFront to create standard logs or real-time logs that show viewer activity.
For more information, see Distribution settings reference.
For the current maximum number of distributions that you can create for each AWS account, see General quotas on distributions. There is no maximum number of files that you can serve per distribution.
You can use distributions to serve the following content over HTTP or HTTPS:
-
Static and dynamic download content, such as HTML, CSS, JavaScript, and image files, using HTTP or HTTPS.
-
Video on demand in different formats, such as Apple HTTP Live Streaming (HLS) and Microsoft Smooth Streaming. (For multi-tenant distributions, Smooth Streaming is not supported.) For more information, see Deliver video on demand with CloudFront.
-
A live event, such as a meeting, conference, or concert, in real time. For live streaming, you can create the distribution automatically by using an AWS CloudFormation stack. For more information, see Deliver video streaming with CloudFront and AWS Media Services.
The following topics provide more details about CloudFront distributions and how to configure them to meet your business needs. For more information about creating a distribution, see Create a distribution.