CloudFront Distribution 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
JSON
{ "Aliases" : [String, ...], "CacheBehaviors" : [CacheBehavior, ...], "Comment" :String, "CustomErrorResponses" : [CustomErrorResponse, ...], "DefaultCacheBehavior" :DefaultCacheBehavior, "DefaultRootObject" :String, "Enabled" :Boolean, "HttpVersion" :String, "IPV6Enabled" :Boolean, "Logging" :Logging, "Origins" : [Origin, ...], "PriceClass" :String, "Restrictions" :Restriction, "ViewerCertificate" :ViewerCertificate, "WebACLId" :String}
YAML
Aliases: -StringCacheBehaviors: -CacheBehaviorComment:StringCustomErrorResponses: -CustomErrorResponseDefaultCacheBehavior:DefaultCacheBehaviorDefaultRootObject:StringEnabled:BooleanHttpVersion:StringIPV6Enabled:BooleanLogging:LoggingOrigins: -OriginPriceClass:StringRestrictions:RestrictionViewerCertificate:ViewerCertificateWebACLId:String
Properties
Aliases-
CNAMEs (alternate domain names), if any, for the distribution.
Required: No
Type: List of String values
Update requires: No interruption
CacheBehaviors-
A list of CacheBehavior types for the distribution.
Required: No
Type: List of CloudFront Distribution CacheBehavior
Update requires: No interruption
Comment-
Any comments that you want to include about the distribution. Optional.
When you create a distribution, you can include a comment of up to 128 characters. You can update the comment at any time.
Required: No
Type: String
Update requires: No interruption
CustomErrorResponses-
Whether CloudFront replaces HTTP status codes in the
4xxand5xxrange with custom error messages before returning the response to the viewer.Required: No
Type List of CloudFront Distribution CustomErrorResponse
Update requires: No interruption
DefaultCacheBehavior-
The default cache behavior that is triggered if you do not specify the
CacheBehaviorproperty or if files don't match any of the values ofPathPatternin theCacheBehaviorproperty.Required: Yes
Type: DefaultCacheBehavior type
Update requires: No interruption
DefaultRootObject-
The object (such as
index.html) that you want CloudFront to request from your origin when the root URL for your distribution (such ashttp://example.com/) is requested.Note
Specifying a default root object avoids exposing the contents of your distribution.
Required: No
Type: String
Update requires: No interruption
Enabled-
Controls whether the distribution is enabled to accept end user requests for content.
Required: Yes
Type: Boolean
Update requires: No interruption
HttpVersion-
The latest HTTP version that viewers can use to communicate with CloudFront. Viewers that don't support the latest version automatically use an earlier HTTP version. By default, AWS CloudFormation specifies
http1.1.For valid values, see the
HttpVersioncontent for the DistributionConfig data type in the Amazon CloudFront API Reference.Required: No
Type: String
Update requires: No interruption
IPV6Enabled-
If you want CloudFront to respond to IPv6 DNS requests with an IPv6 address for your distribution, specify
true. If you specifyfalse, CloudFront responds to IPv6 DNS requests with the DNS response codeNOERRORand with no IP addresses. This allows viewers to submit a second request, for an IPv4 address for your distribution. For more information and usage guidance, see CreateDistribution in the Amazon CloudFront API Reference.Required: No
Type: Boolean
Update requires: No interruption
Logging-
Controls whether access logs are written for the distribution. To turn on access logs, specify this property.
Required: No
Type: Logging type
Update requires: No interruption
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.
Update requires: No interruption
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.
For more information about the valid values, see the
PriceClasscontent for the DistributionConfig data type in the Amazon CloudFront API Reference.Required: No
Type: String
Update requires: No interruption
Restrictions-
Specifies restrictions on who or how viewers can access your content.
Required: No
Type: CloudFront Distribution Restrictions
Update requires: No interruption
ViewerCertificate-
The certificate to use when viewers use HTTPS to request objects.
Required: No
Type: CloudFront Distribution ViewerCertificate
Update requires: No interruption
WebACLId-
The AWS WAF web ACL to associate with this distribution. AWS WAF is a web application firewall that enables you to monitor the HTTP and HTTPS requests that are forwarded to CloudFront and to control who can access your content. CloudFront permits or forbids requests based on conditions that you specify, such as the IP addresses from which requests originate or the values of query strings.
Required: No
Type: String
Update requires: No interruption
