question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

CDK errors with no credentials have been configured if credentials file does not exist

See original GitHub issue

when 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:closed
  • Created 3 years ago
  • Reactions:34
  • Comments:26 (4 by maintainers)

github_iconTop GitHub Comments

51reactions
omishaguptacommented, Apr 17, 2021

The file already exists for me with proper credentials, still not able to solve it. Anyone else facing the same issue?

12reactions
shivlakscommented, Aug 27, 2020

@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?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found