sam-goodwin / eventual

Build scalable and durable micro-services with APIs, Messaging and Workflows
https://docs.eventual.ai
MIT License
174 stars 4 forks source link

Bootstrap stack and region-aware IAM Roles #364

Open sam-goodwin opened 1 year ago

sam-goodwin commented 1 year ago

Our stacks currently provision IAM Roles for the CLI for each Service. This IAM Role has a physical name that is fixed. This is fragile.

I just deployed a Service with the same name to a different region in the same account. It broke because eventual-cli-tests already existed.

I'm thinking we should optimize this by adding a bootstrap stack for each region. Just like the CDK and SST.

sam-goodwin commented 1 year ago

As a quick workaround, what do you think of this @thantos

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

We'll need to update the CLI to append this prefix.