CDK errors with no credentials have been configured if credentials file does not exist
See original GitHub issuewhen running cdk deploy, if a file does not exist at ~/.aws/credentials
, cdk will exit with the message Need to perform AWS calls for account 1234, but no credentials have been configured.
.
There are many ways to provide aws credentials that don’t require the credentials
file, so this should probably be fixed.
In the meantime, the fix is to simply create a file at the expected path (~/.aws/credentials
)
Reproduction Steps
mv ~/.aws/credentials ~/.aws/credentials_backup
cdk deploy --verbose
Error Log
see above
Environment
- CLI Version : 1.30.0 (build 4f54ff7)
- Framework Version:
- OS :
- Language :
Other
This is 🐛 Bug Report
Issue Analytics
- State:
- Created 3 years ago
- Reactions:34
- Comments:26 (4 by maintainers)
Top Results From Across the Web
Need to perform AWS calls for account xxx, but no credentials ...
My credentials file had a user that didn't exist in IAM. For me, the solution was to go back into IAM in the...
Read more >awslabs/aws-cdk - Gitter
I run cdk deploy --profile "test" with the resulting error : Need to perform AWS calls for account XXXXXXXXXX, but no credentials found....
Read more >Resolve "Unable to locate credentials" error in Amazon S3
An "Unable to locate credentials" error indicates that Amazon S3 can't find the credentials to authenticate AWS API calls. To resolve this issue,...
Read more >Troubleshooting common AWS CDK issues
When deploying my AWS CDK stack, I receive a NoSuchBucket error. Your AWS environment has not been bootstrapped, and so does not have...
Read more >The Config Profile could not be Found AWS CLI Error
the value passed to the --profile parameter has been misspelled or the profile is not configured in the AWS credentials file.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
The file already exists for me with proper credentials, still not able to solve it. Anyone else facing the same issue?
@trondhindenes @DioNNiS - have you checked out this blog post which gets into how to use the
cdk-credential
plugin. It’s a tool I’d recommend when working with cross-account actions.I’ve found a fair amount of users who run into this message would have been saved a fair amount of grief if the plugin were used.
can you give it a go and let me know how it goes?