Skip to content

Commit aa407c0

Browse files
author
sam
authoredMay 25, 2023
fix: make eventual-cli role region-specific (#365)
1 parent 1e2eb69 commit aa407c0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed
 

‎packages/@eventual/aws-cdk/src/service.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ export class Service<S = any> extends Construct {
271271
const eventualServiceScope = new Construct(systemScope, "EventualService");
272272

273273
const accessRole = new Role(eventualServiceScope, "AccessRole", {
274-
roleName: `eventual-cli-${this.serviceName}`,
274+
roleName: `eventual-cli-${this.serviceName}-${Stack.of(this).region}`,
275275
assumedBy: new AccountRootPrincipal(),
276276
});
277277

‎packages/@eventual/cli/src/role.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export async function assumeCliRole(
77
): Promise<AwsCredentialIdentity> {
88
const stsClient = new sts.STSClient({ region });
99
const identity = await stsClient.send(new sts.GetCallerIdentityCommand({}));
10-
const roleArn = `arn:aws:iam::${identity.Account}:role/eventual-cli-${service}`;
10+
const roleArn = `arn:aws:iam::${identity.Account}:role/eventual-cli-${service}-${region}`;
1111
const { Credentials } = await stsClient.send(
1212
new sts.AssumeRoleCommand({
1313
RoleArn: roleArn,

0 commit comments

Comments
 (0)
Please sign in to comment.