AWS CloudFormation
User Guide (API Version 2010-05-15)

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.


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



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.


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

Required: No

Type: List of strings


A list of CacheBehavior types for the distribution.

Required: No

Type: List of CacheBehavior


Any comments that you want to include about the distribution.

Required: No

Type: String


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


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


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


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

Required: No

Type: String


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

Required: Yes

Type: Boolean


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

Required: No

Type: Logging type


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.


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


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

Required: No

Type: CloudFront DistributionConfiguration Restrictions


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

Required: No

Type: CloudFront DistributionConfiguration ViewerCertificate

See Also