The CDK CLI has some limitations compared to the AWS CLI. If you are having authentication issues, they might be covered by one of the following issues. Please use this thread to discuss further.
CDK CLI will not read your region from your [default] profile
If your ~/.aws/config is set up like this:
[default]
region = us-east-1
[profile MyProfile]
role_arn = arn:aws:iam::123456789012:role/myprofile
source_profile = SomeOtherProfile
Even though your profile MyProfile does not contain a region, the AWS CLI will read the region from the [default] section. The AWS SDK for JavaScript that the CDK is built on does not do this, so the CDK does not support this. Make sure every profile section contains the region.
Cannot have a profile named "default" in the config file
The following will not work:
[default]
...
[profile default]
...
The AWS CLI seems to accept this, but the AWS SDK for JavaScript will fail to load the configuration file properly.
How to properly select AWS CLI profiles for your stacks/accounts
See issue #3961
The CDK CLI has some limitations compared to the AWS CLI. If you are having authentication issues, they might be covered by one of the following issues. Please use this thread to discuss further.
CDK CLI will not read your region from your [default] profile
If your
~/.aws/configis set up like this:Even though your profile
MyProfiledoes not contain aregion, the AWS CLI will read the region from the[default]section. The AWS SDK for JavaScript that the CDK is built on does not do this, so the CDK does not support this. Make sure every profile section contains theregion.Cannot have a profile named "default" in the config file
The following will not work:
The AWS CLI seems to accept this, but the AWS SDK for JavaScript will fail to load the configuration file properly.
How to properly select AWS CLI profiles for your stacks/accounts
See issue #3961