Skip to content

Commit 169fd91

Browse files
feat(route53): latency based routing (#28723)
In this PR, I have made the RecordSet compatible with latency-based routing. You can set it by providing a Region name to the region argument. ```ts new route53.ARecord(this, 'ARecord', { zone: myZone, target: route53.RecordTarget.fromIpAddresses('1.2.3.4'), region: 'ap-northeast-1', // added }) ``` Closes #28722. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent c1f2abb commit 169fd91

12 files changed

+630
-14
lines changed

packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.latency-based-routing.js.snapshot/Route53LatencyBasedRoutingIntegDefaultTestDeployAssert0B7B9B14.assets.json

+19
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.latency-based-routing.js.snapshot/Route53LatencyBasedRoutingIntegDefaultTestDeployAssert0B7B9B14.template.json

+36
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.latency-based-routing.js.snapshot/cdk.out

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.latency-based-routing.js.snapshot/integ.json

+12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.latency-based-routing.js.snapshot/latency-based-routing.assets.json

+19
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
{
2+
"Resources": {
3+
"HostedZoneDB99F866": {
4+
"Type": "AWS::Route53::HostedZone",
5+
"Properties": {
6+
"Name": "cdk.dev."
7+
}
8+
},
9+
"LatencyBasedRouting0C1664EAC": {
10+
"Type": "AWS::Route53::RecordSet",
11+
"Properties": {
12+
"HostedZoneId": {
13+
"Ref": "HostedZoneDB99F866"
14+
},
15+
"Name": "www.cdk.dev.",
16+
"Region": "us-east-1",
17+
"ResourceRecords": [
18+
"1.2.3.4"
19+
],
20+
"SetIdentifier": "REGION_us-east-1_ID_latencybasedroutintencyBasedRouting09258C5CC",
21+
"TTL": "1800",
22+
"Type": "A"
23+
}
24+
},
25+
"LatencyBasedRouting1D10EA109": {
26+
"Type": "AWS::Route53::RecordSet",
27+
"Properties": {
28+
"HostedZoneId": {
29+
"Ref": "HostedZoneDB99F866"
30+
},
31+
"Name": "www.cdk.dev.",
32+
"Region": "ap-northeast-1",
33+
"ResourceRecords": [
34+
"2.3.4.5"
35+
],
36+
"SetIdentifier": "REGION_ap-northeast-1_ID_latencybasedroucyBasedRouting193C4855F",
37+
"TTL": "1800",
38+
"Type": "A"
39+
}
40+
},
41+
"LatencyBasedRouting26C32588A": {
42+
"Type": "AWS::Route53::RecordSet",
43+
"Properties": {
44+
"HostedZoneId": {
45+
"Ref": "HostedZoneDB99F866"
46+
},
47+
"Name": "www.cdk.dev.",
48+
"Region": "eu-west-1",
49+
"ResourceRecords": [
50+
"3.4.5.6"
51+
],
52+
"SetIdentifier": "REGION_eu-west-1_ID_latencybasedroutintencyBasedRouting25966E4AD",
53+
"TTL": "1800",
54+
"Type": "A"
55+
}
56+
}
57+
},
58+
"Parameters": {
59+
"BootstrapVersion": {
60+
"Type": "AWS::SSM::Parameter::Value<String>",
61+
"Default": "/cdk-bootstrap/hnb659fds/version",
62+
"Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]"
63+
}
64+
},
65+
"Rules": {
66+
"CheckBootstrapVersion": {
67+
"Assertions": [
68+
{
69+
"Assert": {
70+
"Fn::Not": [
71+
{
72+
"Fn::Contains": [
73+
[
74+
"1",
75+
"2",
76+
"3",
77+
"4",
78+
"5"
79+
],
80+
{
81+
"Ref": "BootstrapVersion"
82+
}
83+
]
84+
}
85+
]
86+
},
87+
"AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI."
88+
}
89+
]
90+
}
91+
}
92+
}

packages/@aws-cdk-testing/framework-integ/test/aws-route53/test/integ.latency-based-routing.js.snapshot/manifest.json

+131
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)