-
Notifications
You must be signed in to change notification settings - Fork 13
/
template.json
66 lines (66 loc) · 2.3 KB
/
template.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
{
"AWSTemplateFormatVersion": "2010-09-09",
"Parameters": {
"Domains": {
"Type": "CommaDelimitedList",
"Description": "Comma-separated list of domain names"
}
},
"Resources": {
"DistributionCertificate": {
"Type": "Custom::AcmCertificateAssociation",
"Properties": {
"CertificateArn": {
"Ref": "ACMCertificate"
},
"DistributionId": {
"Ref": "SiteCDN"
},
"ServiceToken": "arn:aws:lambda:us-east-1:REDACTED:function:CfnAcmCloudFrontAssociator"
}
},
"ACMCertificate": {
"Type": "Custom::AcmCertificateRequest",
"Properties": {
"Domains": {
"Ref": "Domains"
},
"Await": true,
"ServiceToken": "arn:aws:lambda:us-east-1:REDACTED:function:CfnAcmCertificate"
}
},
"SiteCDN": {
"Type": "AWS::CloudFront::Distribution",
"Description": "CDN for site content",
"Properties": {
"DistributionConfig": {
"DefaultCacheBehavior": {
"ViewerProtocolPolicy": "allow-all",
"ForwardedValues": {
"QueryString": true
},
"TargetOriginId": "static-site-origin",
"MinTTL": 300
},
"Origins": [
{
"DomainName": "rsb.io.s3-website-us-east-1.amazonaws.com",
"Id": "static-site-origin",
"CustomOriginConfig": {
"OriginProtocolPolicy": "http-only",
"HTTPPort": 80,
"HTTPSPort": 443
}
}
],
"PriceClass": "PriceClass_100",
"DefaultRootObject": "index.html",
"Enabled": true,
"Aliases": {
"Ref": "Domains"
}
}
}
}
}
}