-
Notifications
You must be signed in to change notification settings - Fork 0
/
CloudFront_S3.template
32 lines (29 loc) · 1.06 KB
/
CloudFront_S3.template
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
{
"AWSTemplateFormatVersion" : "2010-09-09",
"Description" : "AWS CloudFormation Sample Template CloudFront_S3: Sample template showing how to create an Amazon CloudFront distribution using an S3 origin. **WARNING** This template creates one or more AWS resources. You will be billed for the AWS resources used if you create a stack from this template.",
"Parameters" : {
"S3DNSName" : {
"Type" : "String",
"Description" : "The DNS name of an existing S3 bucket to use as the Cloudfront distribution origin"
}
},
"Resources" : {
"myDistribution" : {
"Type" : "AWS::CloudFront::Distribution",
"Properties" : {
"DistributionConfig" : {
"S3Origin" : {"DNSName": { "Ref" : "S3DNSName" }},
"Enabled" : "true"
}
}
}
},
"Outputs" : {
"DistributionId" : {
"Value" : { "Ref" : "myDistribution" }
},
"DistributionName" : {
"Value" : { "Fn::Join" : [ "", ["http://", {"Fn::GetAtt" : ["myDistribution", "DomainName"]} ]]}
}
}
}