-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy paths3infra.json
44 lines (44 loc) · 1.08 KB
/
s3infra.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
{
"AWSTemplateFormatVersion" : "2010-09-09",
"Description": "Buckets used for the website and associated core systems.",
"Parameters" : {
"DomainName": {
"Type": "String"
}
},
"Resources" : {
"Bucket" : {
"Type" : "AWS::S3::Bucket",
"Properties" : {
"BucketName" : {"Ref": "DomainName"},
"AccessControl" : "PublicRead",
"WebsiteConfiguration" : {
"IndexDocument" : "index.html",
"ErrorDocument" : "error.html"
},
"CorsConfiguration": {
"CorsRules" : [{
"AllowedHeaders" : [ "Authorization" ],
"AllowedMethods" : [ "GET" ],
"AllowedOrigins" : [ "*" ],
"MaxAge" : 3000
}]
}
}
},
"WWWRedirectBucket": {
"Type": "AWS::S3::Bucket",
"Properties": {
"BucketName": {
"Fn::Join": [".", ["www", {"Ref":"DomainName"}]]
},
"AccessControl": "BucketOwnerFullControl",
"WebsiteConfiguration": {
"RedirectAllRequestsTo": {
"HostName": {"Ref": "DomainName"}
}
}
}
}
}
}