I don't want to use my default aws profile and account for cdk development
So I created a new account and a new profile cdkprof
using aws configure --profile cdkprof
.
I have verified in ~/.aws/credentials
and ~/.aws/config
files that the new profile created correctly. running export AWS_PROFILE=cdkprof && aws configure list && aws sts get-caller-identity
returns me my profile details correctly.
I have also exported
- CDK_DEFAULT_REGION,
- CDK_DEFAULT_ACCOUNT,
- AWS_DEFAULT_REGION,
- AWS_PROFILE,
- AWS_SECRET_ACCESS_KEY and
- AWS_ACCESS_KEY_ID
and these are available as environment variables in bash.
However when I try to run :
$ npx cdk bootstrap --profile cdkprof
I get the error
Unable to resolve AWS account to use. It must be either configured when you define your CDK or through the environment
How do I use my new profile and account with the cdk commands?
Thanks.