Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ssm): fix service principals for all regions since ap-east-1 #17047

Merged
merged 13 commits into from
Nov 11, 2021
1 change: 1 addition & 0 deletions packages/@aws-cdk/region-info/lib/default.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/region-info/test/default.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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`);
});
Expand Down