aws / aws/aws-cdk

app-staging-synthesizer: get S3 access denied error on stack deployment

Open
#27,434 3 comments 0 reactions 1 assignee Assigned to @vinayak-kukreja View on GitHub
@aws-cdk/app-staging-synthesizer-alpha bug p2
Dominant language
TypeScript
Stars
12.9k
Forks
4.6k
Avg merge
2d 3h
Merged PRs (30d)
83

Description

### Describe the bug

**Also see the comment**: https://github.com/aws/aws-cdk/issues/27434#issuecomment-1754314951

Hi, in the article about AppStagingSynthesizer recently published, we can see the following description about IAM roles to deploy stacks.

> Reduced Bootstrapping Complexity: As the only shared resources required are global Roles, the company now only needs to bootstrap every account in one Region instead of bootstrapping every Region. This simplifies the bootstrapping process, making it easier to manage with CloudFormation StackSets.
> https://aws.amazon.com/blogs/devops/enhancing-resource-isolation-in-aws-cdk-with-the-app-staging-synthesizer/

So I expect that a cdk app using AppStagingSynthesizer can be deployed to any region if we've done cdk bootstrapping in one region. However, currently it seems that we need to bootstrap in each region we're deploying to.

I'd like to make sure if it is expected or not. Maybe a documentation error? Thanks.

### Expected Behavior

A cdk app using AppStagingSynthesizer can be deployed to any region if we've done cdk bootstrapping in one region.

### Current Behavior

We need to bootstrap in each region we're deploying to.

### Reproduction Steps

Bootstrap a region e.g. us-east-1.

Then, when I try to deploy a cdk app using AppStagingSynthesizer to another region without bootstrapping, I get the following error:

```
❌ Deployment failed: Error [ValidationError]: Role arn:aws:iam::123456789012:role/cdk-hnb659fds-cfn-exec-role-123456789012-eu-west-2 is invalid or cannot be assumed
```

The role name contains region `eu-west-2`, so it seems we have to bootstrap eu-west-2 first.

### Possible Solution

_No response_

### Additional Information/Context

_No response_

### CDK CLI Version

2.98.0

### Framework Version

2.98.0

### Node.js Version

v18.13.0

### OS

macOS

### Language

Typescript

### Language Version

_No response_

### Other information

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.