Skip to content

Instantly share code, notes, and snippets.

@chrismckinnel
Created June 12, 2019 09:21
Show Gist options
  • Save chrismckinnel/9d192889a9ee5734c14a1cd8fd6de64e to your computer and use it in GitHub Desktop.
Save chrismckinnel/9d192889a9ee5734c14a1cd8fd6de64e to your computer and use it in GitHub Desktop.
CloudFront:
Type: AWS::CloudFront::Distribution
Properties:
DistributionConfig:
DefaultCacheBehavior:
Compress: true
ForwardedValues:
QueryString: true
TargetOriginId: google-origin
ViewerProtocolPolicy: redirect-to-https
DefaultTTL: 0
MaxTTL: 0
MinTTL: 0
LambdaFunctionAssociations:
- EventType: viewer-request
LambdaFunctionARN: !Ref RedirectLambdaFunction.Version
Enabled: true
HttpVersion: http2
PriceClass: PriceClass_All
Origins:
- DomainName: www.google.com
Id: google-origin
CustomOriginConfig:
OriginProtocolPolicy: https-only
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment