forked from AHinMaine/AWSCloudFormation-samples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Route53_RoundRobin.template
37 lines (34 loc) · 1.8 KB
/
Route53_RoundRobin.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
33
34
35
36
37
{
"AWSTemplateFormatVersion" : "2010-09-09",
"Description" : "AWS CloudFormation Sample Template Route53_RoundRobin: Sample template showing how to use weighted round robin (WRR) DNS entried via Amazon Route 53. This contrived sample uses weighted CNAME records to illustrate that the weighting influences the return records. It assumes that you already have a Hosted Zone registered with Amazon Route 53. **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" : {
"HostedZone" : {
"Type" : "String",
"Description" : "The DNS name of an existing Amazon Route 53 hosted zone"
}
},
"Resources" : {
"myDNSRecord" : {
"Type" : "AWS::Route53::RecordSetGroup",
"Properties" : {
"HostedZoneName" : { "Fn::Join" : [ "", [{"Ref" : "HostedZone"}, "." ]]},
"Comment" : "Contrived example to redirect to aws.amazon.com 75% of the time and www.amazon.com 25% of the time.",
"RecordSets" : [{
"SetIdentifier" : { "Fn::Join" : [ " ", [{"Ref" : "AWS::StackId"}, "AWS" ]]},
"Name" : { "Fn::Join" : [ "", [{"Ref" : "AWS::StackId"}, ".", {"Ref" : "AWS::Region"}, ".", {"Ref" : "HostedZone"}, "."]]},
"Type" : "CNAME",
"TTL" : "900",
"ResourceRecords" : ["aws.amazon.com"],
"Weight" : "3"
},{
"SetIdentifier" : { "Fn::Join" : [ " ", [{"Ref" : "AWS::StackId"}, "Amazon" ]]},
"Name" : { "Fn::Join" : [ "", [{"Ref" : "AWS::StackId"}, ".", {"Ref" : "AWS::Region"}, ".", {"Ref" : "HostedZone"}, "."]]},
"Type" : "CNAME",
"TTL" : "900",
"ResourceRecords" : ["www.amazon.com"],
"Weight" : "1"
}]
}
}
}
}