Fixes the cdk plugin not handling the --profile flag correctly when a profile is using role assumption. Now it matches the expected behavior of the aws plugin's --profile flag and the AWS_PROFILE environment variable.
Type of change
[ ] Created a new plugin
[ ] Improved an existing plugin
[x] Fixed a bug in an existing plugin
[ ] Improved contributor utilities or experience
How To Test
If you have an existing CDK stack, you can confirm that using a profile to assume a role used for deployments.
cd $YOUR_CDK_DIR
cdk diff --profile cdk-stack-admin
Example ~/.aws/config file. Swap out with names and numbers from your account
Overview
Fixes the cdk plugin not handling the
--profile
flag correctly when a profile is using role assumption. Now it matches the expected behavior of the aws plugin's--profile
flag and theAWS_PROFILE
environment variable.Type of change
How To Test
If you have an existing CDK stack, you can confirm that using a profile to assume a role used for deployments.
Example
~/.aws/config
file. Swap out with names and numbers from your accountWithout the patch, the cdk will encounter the error below and fail
Changelog
AWS CDK Plugin now supports AWS Profiles that assume a role, when specified by the
--plugin
flag.