(cli): bootstrap should create role for cdk
CLI to assume when doing cross account deploys
#11848
Labels
feature-request
A feature should be added or improved.
needs-triage
This issue or PR still needs to be triaged.
package/tools
Related to AWS CDK Tools or CLI
Use Case
cdk CLI makes calls to a target account using either current credentials or credentials obtained from a plugin. Because single CDK app can deploy to multiple accounts, current credentials won't work and it is required to assume role in every target account.
cdk-assume-role-credential-plugin
helps to make assume role seamless, but there is currently no such role created by the bootstrap process and separate out of band role creation required.Proposed Solution
Bootstrap process shouls create a new role in a target account, with enough permissions to do following:
cdk-assume-role-credential-plugin
can then be configured to use that role, making cross account deploys easier to implement.Other
Existing roles for deploy, image assets and file assets allow establishing trust relationship with account where deploys should be running from, but it is not clear how exactly that cross account trust should be used. CDK CLI assumes these roles at various stages, but prior to it validates, that account it is running from matches account we are deploying to , aborting execution if they don't. This makes
bootstrap --trust
half complete.If proposed feature is implemented, there will be not cross account
sts:AsumeRole
calls for these roles, only for the new one.This is a 🚀 Feature Request
The text was updated successfully, but these errors were encountered: