-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Need to perform AWS calls for account XXX, but no credentials have been configured but they are #20935
Comments
@jedrekdomanski can you provide the verbose logs from running |
Oh, it looks related to the bug I reported earlier #20875 because in verbose logs I can see the same message:
It looks like |
I have mulitple AWS profiles
|
@jedrekdomanski do you have multiple profiles that share the same name? For example
|
Yes, I do. In
In
|
Can you remove the entry that does not contain |
Coming from the other thread, I've reached the same conclusion as cory. let us know if this works! |
I have this same problem. I have configured all the correct credentials in It's just failing with, |
@ishanjain28 can you provide the verbose output? |
|
I also just upgraded CDK Cli to |
@ishanjain28 do you have a |
@corymhall There is no I can run, |
@ishanjain28 the CDK CLI does not have the capability to automatically pick the correct profile for the configured stack environment. The CLI needs some set of credentials to start with, and if you do not provide the If you have bootstrapped your accounts then there will be a set of IAM roles that have been created in those accounts. When you run a CDK command, the CLI will use your configured credentials to assume the bootstrapped roles in each account. So for example if you run |
hey @corymhall thanks for the detailed response! I had a fundamental misunderstanding of how this worked and made incorrect assumptions. |
This issue has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled. |
having same error here, even though I'm using --profile I have multiple accounts configured. All of. them as
|
If the credentials-file and config-file does not align (for example you have default credentials but no default-section in config it looks like I get the same error as you @vramirez |
Why is this closed if it's not resolved? I have the same problem even when using the CDK shouldn't require a specific layout of AWS configuration files, and ideally it should behave the same as AWS CLI when a profile is not explicitly given (i.e. reading the |
Same issue here. THIS SHOULD NOT BE CLOSED!!! Please have the CDK use AWS_PROFILE like AWS CLI does |
Same issue here |
Mentioning @corymhall as it seems this won't be seen otherwise. Please see the three comments above. |
I have the same issue. But I solved this by my self.
The solutions is to rename |
@qianyangcassie Thanks!! this solved it for me... crazy, I can't believe I spent time on this nonsense bug |
FWIW, setting this also allows
Something ugly is happening under the hood. |
@awbacker thanks! you are legend 👍 |
Can anyone help me with the same. It is working in the local cli, but getting this error in github actions |
Describe the bug
I have aws CLI configured, I have
~/.aws/config
and
~/.aws/credentials
Configured my Stack for my account and region
But
cdk synth
still raises an errorNeed to perform AWS calls for account XXX, but no credentials have been configured
Expected Behavior
cdk-synth
works fineCurrent Behavior
Need to perform AWS calls for account XXX, but no credentials have been configured
Reproduction Steps
Create Stack as above and try to
cdk synth
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.29.1 (build c42e961)
Framework Version
No response
Node.js Version
v18.4.0
OS
MacOS 12.3.1
Language
Typescript
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: