Configuration template to deploy a CloudFront distribution. A distribution tells CloudFront where you want content to be delivered from, and the details about how to track and manage content delivery.

The following settings and configuration options are available: 

  • Origin: Provides details about the content origin that CloudFront will serve from. This can be an S3 bucket, load balancer, mediastore, or a custom origin.
  • Cache Behaviors: At least one cache behavior should be configured to specify how caching is handled for the content 
  • Distribution settings such as IPv6 support, HTTP version, description, SSL support, custom domain names, etc.
  • Web ACL Id to associate an AWS WAF policy to protect inspect traffic processed through the CloudFront distribution
  • Logging settings to forward logs to an S3 bucket
  • Origin groups for scenarios that require high availability
  • Custom error responses to customize or replace the standard HTTP error responses 
Items
1
Size
0.8 KB
Missing Parameters
AWSTemplateFormatVersion: '2010-09-09'
Description: ''
Resources:
  CloudFrontDistribution:
    Type: 'AWS::CloudFront::Distribution'
    Properties:
      DistributionConfig:
        Enabled: true
        IPV6Enabled: true
        HttpVersion: http1.1
        PriceClass: PriceClass_All
        ViewerCertificate:
          CloudFrontDefaultCertificate: true
        Restrictions:
          GeoRestriction:
            RestrictionType: none
        DefaultCacheBehavior:
          TargetOriginId: ''
          Compress: true
          ViewerProtocolPolicy: allow-all
          AllowedMethods:
            - GET
            - HEAD
          CachedMethods:
            - GET
            - HEAD
          CachePolicyId: 658327ea-f89d-4fab-a63d-7e88639e58f6
          SmoothStreaming: false
Parameters: {}
Metadata: {}
Conditions: {}

Actions



Customize Template

Origins*

Cache Behaviors*


Distribution Settings

Standard Logging

Restrictions

Origin Groups

Custom Error Responses

* Required field