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)
mv ~/.aws/credentials ~/.aws/credentials_backup
cdk deploy --verbose
see above
This is :bug: Bug Report
using the environment variables:
AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY
AWS_DEFAULT_REGION
works for me.
https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html
cdk version 1.57.0
@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?
@shivlaks this bug (which I understand is fixed now) simply meant that a file had to exist on the filesystem for CDK to be able to work. I don't have any issues with authentication or credentials, I just found that this file needed to exist (empty or not).
Sidenote: I had a look at the credential-plugin now. As sweet as it looks, one of CDK's selling points is its cross-language support. This means that utilities and helpers also need to be cross-language. We're standardized on python for all our "iac" stuff and so this plugin wouldn't solve my issue since it seems to require a TS/JS-based cdk codebase.