Skip to content

Instantly share code, notes, and snippets.

@thehelvetian
Forked from li0nel/cloudformation.yaml
Created January 1, 2019 06:02
Show Gist options
  • Save thehelvetian/d742e2f76a0eda286a0745af4756e156 to your computer and use it in GitHub Desktop.
Save thehelvetian/d742e2f76a0eda286a0745af4756e156 to your computer and use it in GitHub Desktop.
CloudFrontDistribution:
Type: AWS::CloudFront::Distribution
Properties:
DistributionConfig:
Origins:
- DomainName: !Ref S3BucketDNSName
Id: myS3Origin
S3OriginConfig:
OriginAccessIdentity: !Ref CloudFrontOAI
Enabled: 'true'
Aliases:
- !Ref CDNAlias
DefaultCacheBehavior:
Compress: 'true'
AllowedMethods:
- GET
- HEAD
- OPTIONS
TargetOriginId: myS3Origin
ForwardedValues:
QueryString: 'false'
Cookies:
Forward: none
ViewerProtocolPolicy: redirect-to-https
ViewerCertificate:
AcmCertificateArn: !Ref CertificateArn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment