Created
January 2, 2021 18:16
-
-
Save JonHolman/392a1a6b1a381af187212b2aab7a13fe to your computer and use it in GitHub Desktop.
part-5-adding-cloudfront-distribution-resource
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CloudFrontDistribution: | |
Type: AWS::CloudFront::Distribution | |
Properties: | |
DistributionConfig: | |
Origins: | |
- Id: apiGatewayRestApi | |
DomainName: !Sub ${RestAPI}.execute-api.${AWS::Region}.amazonaws.com | |
OriginPath: /Prod | |
CustomOriginConfig: | |
OriginProtocolPolicy: https-only | |
Enabled: true | |
DefaultCacheBehavior: | |
Compress: True | |
ForwardedValues: | |
QueryString: false | |
DefaultTTL: 600 # in seconds (600 = 10 minutes) | |
TargetOriginId: apiGatewayRestApi | |
ViewerProtocolPolicy: redirect-to-https |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment