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

(module name): (short issue description) #26985

Closed
VXConsulting opened this issue Sep 2, 2023 · 2 comments
Closed

(module name): (short issue description) #26985

VXConsulting opened this issue Sep 2, 2023 · 2 comments
Labels
@aws-cdk/assets Related to the @aws-cdk/assets package bug This issue is a bug. needs-triage This issue or PR still needs to be triaged.

Comments

@VXConsulting
Copy link

Describe the bug

CDK does not take into account the synthesizer name.

Previously, I was able to use a synthesizer name in all my deployments.
Even the bootstrapping of the accounts are using synthesizer names.

new InfraApigwForDashStack(app, stackName, {
  synthesizer: new DefaultStackSynthesizer({
    qualifier: env
  }),
  description: description,
  envName: env
});

Now, when I try to deploy, I have the following error:

cdk deploy -c envName=test

current credentials could not be used to assume 'arn:aws:iam::xxxxxxx:role/cdk-hnb659fds-deploy-role-xxxxxxx-eu-west-1', but are for the right account. Proceeding anyway.

It means that the qualifier is not taken into account when the stack is synthesized.

It is visible in the STACK-NAME.assets.json file

"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", ... "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"

All the previous stacks, already installed are working fine.
But it is impossible to deploy new ones.

Expected Behavior

Stack must be synthesized with the correct qualifier.
I am using qualifier since 2 years. All the stacks and environments are already configured.
I have the SSM correctly configured.
I have the roles configured with qualifier's name instead of hnb659fds name.

Current Behavior

No deployment is possible as it shows the error:

current credentials could not be used to assume 'arn:aws:iam::xxxxxx:role/cdk-hnb659fds-deploy-role-xxxxxx-eu-west-1', but are for the right account. Proceeding anyway.

Reproduction Steps

cdk deploy -c envName=test

I use envName to specify the qualifier in the stack creation.

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

2.94

Framework Version

No response

Node.js Version

18.16.0

OS

windows 11

Language

Typescript

Language Version

5.2.2

Other information

No response

@VXConsulting VXConsulting added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Sep 2, 2023
@github-actions github-actions bot added the @aws-cdk/assets Related to the @aws-cdk/assets package label Sep 2, 2023
@VXConsulting
Copy link
Author

I found the problem ...

@github-actions
Copy link

github-actions bot commented Sep 2, 2023

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/assets Related to the @aws-cdk/assets package bug This issue is a bug. needs-triage This issue or PR still needs to be triaged.
Projects
None yet
Development

No branches or pull requests

1 participant