From 59005483ea1224a147db479471f541e2efb9ba23 Mon Sep 17 00:00:00 2001 From: JoLo <54506108+jolo-dev@users.noreply.github.com> Date: Thu, 11 Nov 2021 11:13:48 +0100 Subject: [PATCH] fix(ssm): fix service principals for all regions since ap-east-1 (#17047) fixes #16188 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/region-info/lib/default.ts | 1 + packages/@aws-cdk/region-info/test/default.test.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/@aws-cdk/region-info/lib/default.ts b/packages/@aws-cdk/region-info/lib/default.ts index abd1001678bf2..c0ae0cc2b28d5 100644 --- a/packages/@aws-cdk/region-info/lib/default.ts +++ b/packages/@aws-cdk/region-info/lib/default.ts @@ -82,6 +82,7 @@ export class Default { // Services with a regional principal case 'states': + case 'ssm': return `${service}.${region}.amazonaws.com`; // Services with a partitional principal diff --git a/packages/@aws-cdk/region-info/test/default.test.ts b/packages/@aws-cdk/region-info/test/default.test.ts index b39952842d75a..1e7c1b166c9b6 100644 --- a/packages/@aws-cdk/region-info/test/default.test.ts +++ b/packages/@aws-cdk/region-info/test/default.test.ts @@ -5,7 +5,7 @@ const urlSuffix = '.nowhere.null'; describe('servicePrincipal', () => { for (const suffix of ['', '.amazonaws.com', '.amazonaws.com.cn']) { - for (const service of ['states']) { + for (const service of ['states', 'ssm']) { test(`${service}${suffix}`, () => { expect(Default.servicePrincipal(`${service}${suffix}`, region, urlSuffix)).toBe(`${service}.${region}.amazonaws.com`); });