-
Notifications
You must be signed in to change notification settings - Fork 0
/
s3_bucket_cloudformation.json
41 lines (38 loc) · 1.06 KB
/
s3_bucket_cloudformation.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
{
"AWSTemplateFormatVersion" : "2010-09-09",
"Description" : "AWS CloudFormation Template to create a static S3 website configuration.",
"Parameters": {
"BucketName" :{
"Description" : "Enter a valid bucket name",
"Type": "String",
"MinLength": "5",
"MaxLength": "20"
}
},
"Resources" : {
"S3Bucket" : {
"Type" : "AWS::S3::Bucket",
"Properties" : {
"AccessControl" : "PublicRead",
"BucketName": { "Ref" : "BucketName" },
"WebsiteConfiguration" : {
"IndexDocument" : "index.html",
"ErrorDocument" : "error.html"
}
}
}
},
"Outputs" : {
"WebsiteURL" : {
"Value" : { "Fn::GetAtt" : [ "S3Bucket", "WebsiteURL" ] },
"Description" : "The URL of the newly created website"
},
"S3BucketSecureURL": {
"Value" : { "Fn::Join" : [ "",
[ "https://", { "Fn::GetAtt" : [ "S3Bucket", "DomainName" ] } ]
]
},
"Description" : "S3 bucket secure URL"
}
}
}