Skip to content

Commit fb45b2e

Browse files
committed
fix(config-resolver): resolve region first from regionHash
1 parent 98f530e commit fb45b2e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/config-resolver/src/regionInfo/getRegionInfo.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ describe(getRegionInfo.name, () => {
5252
});
5353

5454
const getMockResolvedRegion = (regionCase: RegionCase): string =>
55-
regionCase === RegionCase.REGION ? mockRegion : mockEndpointRegion;
55+
regionCase !== RegionCase.ENDPOINT ? mockRegion : mockEndpointRegion;
5656

5757
const getMockResolvedPartitionOptions = (partitionHash) => ({ partitionHash });
5858

packages/config-resolver/src/regionInfo/getRegionInfo.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export const getRegionInfo = (
1717
{ signingService, regionHash, partitionHash }: GetRegionInfoOptions
1818
): RegionInfo => {
1919
const partition = getResolvedPartition(region, { partitionHash });
20-
const resolvedRegion = partitionHash[partition]?.endpoint ?? region;
20+
const resolvedRegion = region in regionHash ? region : partitionHash[partition]?.endpoint ?? region;
2121

2222
const hostname = getResolvedHostname(resolvedRegion, {
2323
signingService,

0 commit comments

Comments
 (0)