Skip to content

Commit 080875c

Browse files
authored
update Route53 endpoint resolution in us-iso regions (#4056)
1 parent 09d75b3 commit 080875c

File tree

3 files changed

+28
-6
lines changed

3 files changed

+28
-6
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"type": "bugfix",
3+
"category": "Route53",
4+
"description": "fix Route53 endpoints resolution for us-iso-* regions"
5+
}

lib/region_config_data.json

+10
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,16 @@
2424
"signingRegion": "cn-northwest-1"
2525
},
2626
"us-gov-*/route53": "globalGovCloud",
27+
"us-iso-*/route53": {
28+
"endpoint": "{service}.c2s.ic.gov",
29+
"globalEndpoint": true,
30+
"signingRegion": "us-iso-east-1"
31+
},
32+
"us-isob-*/route53": {
33+
"endpoint": "{service}.sc2s.sgov.gov",
34+
"globalEndpoint": true,
35+
"signingRegion": "us-isob-east-1"
36+
},
2737

2838
"*/waf": "globalSSL",
2939

test/region_config.spec.js

+13-6
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,20 @@ describe('region_config.js', function() {
4747
expect(service.endpoint.host).to.equal('iam.cn-north-1.amazonaws.com.cn');
4848
});
4949

50-
it('uses "global" endpoint for Route53 in cn-north-1', function() {
51-
var service = new AWS.Route53({
52-
region: 'cn-north-1'
50+
[
51+
['cn-north-1', 'cn-northwest-1', 'route53.amazonaws.com.cn'],
52+
['us-gov-west-1', 'us-gov-west-1', 'route53.us-gov.amazonaws.com'],
53+
['us-iso-west-1', 'us-iso-east-1', 'route53.c2s.ic.gov'],
54+
['us-isob-west-1', 'us-isob-east-1', 'route53.sc2s.sgov.gov'],
55+
].forEach(function([region, signingRegion, endpoint]) {
56+
it('uses "global" endpoint for Route53 in ' + region, function () {
57+
var service = new AWS.Route53({
58+
region
59+
});
60+
expect(service.isGlobalEndpoint).to.equal(true);
61+
expect(service.signingRegion).to.equal(signingRegion);
62+
expect(service.endpoint.host).to.equal(endpoint);
5363
});
54-
expect(service.isGlobalEndpoint).to.equal(true);
55-
expect(service.signingRegion).to.equal('cn-northwest-1');
56-
expect(service.endpoint.host).to.equal('route53.amazonaws.com.cn');
5764
});
5865

5966
it('enables signature version 4 signing in cn-*', function() {

0 commit comments

Comments
 (0)