Skip to content

Instantly share code, notes, and snippets.

@doapp-ryanp
Created October 21, 2015 18:06
Show Gist options
  • Save doapp-ryanp/ab89f5596b0297c3a9c1 to your computer and use it in GitHub Desktop.
Save doapp-ryanp/ab89f5596b0297c3a9c1 to your computer and use it in GitHub Desktop.
cloud formation for CloudFront in front of API Gateway
{
"Type": "AWS::CloudFront::Distribution",
"Properties": {
"DistributionConfig": {
"Origins": [
{
"Id": "pushchansearch",
"DomainName": "myapig.execute-api.us-east-1.amazonaws.com",
"CustomOriginConfig": {
"HTTPPort": "80",
"HTTPSPort": "443",
"OriginProtocolPolicy": "match-viewer"
},
"OriginPath": {
"Fn::Join": [
"",
[
"/",
{
"Ref": "aaStage"
}
]
]
}
}
],
"Enabled": true,
"Comment": "Push channel search",
"PriceClass": "PriceClass_100",
"DefaultCacheBehavior": {
"AllowedMethods": [
"GET",
"HEAD",
"OPTIONS"
],
"CachedMethods": [
"HEAD",
"GET"
],
"ForwardedValues": {
"QueryString": true,
"Headers": [],
"Cookies": {
"Forward": "none"
}
},
"MinTTL": "0",
"TargetOriginId": "pushchansearch",
"ViewerProtocolPolicy": "https-only"
},
"CustomErrorResponses": [
]
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment