我们正在开发一个多账户CDK应用程序,并在CodeBuild上进行持续部署。我们意识到CDK 身份验证问题,因此我们使用$ aws sts assume-role
并设置环境变量来在$ cdk deploy
. 这种方式适用于$ cdk deploy
,但$ cdk bootstrap
不适用于。 $ cdk bootstrap
尝试引导每个帐户并需要多个帐户凭据。有没有简单的方法可以提供多个帐户凭据$ cdk bootstrap
?(实现自定义插件并不“简单”...)否则,有什么方法可以引导单个帐户吗?
# with 111111111111 account credential\n$ cdk bootstrap --execute=false\n \xe2\x8f\xb3 Bootstrapping environment aws://111111111111/us-east-1...\n \xe2\x8f\xb3 Bootstrapping environment aws://222222222222/us-east-1...\n \xe2\x9d\x8c Environment aws://222222222222/us-east-1 failed bootstrapping: Error: Need to perform AWS calls for account 222222222222, but no credentials found. Tried: default credentials.\n
Run Code Online (Sandbox Code Playgroud)\n\n# with 111111111111 account credential\n$ cdk bootstrap --execute=false\n \xe2\x8f\xb3 Bootstrapping environment …
Run Code Online (Sandbox Code Playgroud) aws-cdk ×1