AWS CloudFormation
User Guide (API Version 2010-05-15)
Did this page help you?  Yes | No |  Tell us about it...
« PreviousNext »
View the PDF for this guide.Go to the AWS Discussion Forum for this product.Go to the Kindle Store to download this guide in Kindle format.

CloudFront DistributionConfig

DistributionConfig is a property of the AWS::CloudFront::Distribution property that describes which Amazon CloudFront origin servers to get your files from when users request the files through your website or application.

Syntax

{
   "Aliases" : [ String, ... ],
   "CacheBehaviors" : [ CacheBehavior, ... ],
   "Comment" : String,
   "CustomErrorResponses" : [ CustomErrorResponse, ... ],
   "DefaultCacheBehavior" : DefaultCacheBehavior,
   "DefaultRootObject" : String,
   "Enabled" : Boolean,
   "Logging" : Logging,
   "Origins" : [ Origin, ... ],
   "PriceClass" : String,
   "Restrictions" : Restriction,
   "ViewerCertificate" : ViewerCertificate
}     

Properties

Note

For more information about the constraints and valid values of each property, see the elements table in the DistributionConfig Complex Type topic in the Amazon CloudFront API Reference.

Aliases

CNAMEs (alternate domain names), if any, for the distribution.

Required: No

Type: A list of strings

CacheBehaviors

A list of CacheBehavior types for the distribution.

Required: No

Type: List of CacheBehavior

Comment

Any comments that you want to include about the distribution.

Required: No

Type: String

CustomErrorResponses

Whether CloudFront replaces HTTP status codes in the 4xx and 5xx range with custom error messages before returning the response to the viewer.

Required: No

Type List of CloudFront DistributionConfig CustomErrorResponse

DefaultCacheBehavior

The default cache behavior that is triggered if you do not specify the CacheBehavior property or if files don't match any of the values of PathPattern in the CacheBehavior property.

Required: Yes

Type: DefaultCacheBehavior type

DefaultRootObject

The object (such as index.html) that you want CloudFront to request from your origin when the root URL for your distribution (such as http://example.com/) is requested.

Note

Specifying a default root object avoids exposing the contents of your distribution.

Required: No

Type: String

Enabled

Controls whether the distribution is enabled to accept end user requests for content.

Required: Yes

Type: Boolean

Logging

Controls whether access logs are written for the distribution. To turn on access logs, specify this property.

Required: No

Type: Logging type

Origins

A list of origins for this CloudFront distribution. For each origin, you can specify whether it is an Amazon S3 or custom origin.

Required: Yes

Type: List of Origins.

PriceClass

The price class that corresponds with the maximum price that you want to pay for the CloudFront service. For more information, see Choosing the Price Class in the Amazon CloudFront Developer Guide.

Required: No

Type: String

Restrictions

Specifies restrictions on who or how viewers can access your content.

Required: No

Type: CloudFront DistributionConfiguration Restrictions

ViewerCertificate

The certificate to use when viewers use HTTPS to request objects.

Required: No

Type: CloudFront DistributionConfiguration ViewerCertificate

Template Examples

To view AWS::CloudFront::Distribution snippets, see Amazon CloudFront Template Snippets.

See Also