AWS CDK:在 运行 'cdk bootstrap' 命令时不构建资产

AWS CDK: Don't build assets when running 'cdk bootstrap' command

我使用 Docker & Dockerfile:

捆绑我的资产
Code.from_docker_build(
    path='/path',
    build_args={},
)

每次我 运行 cdk deploycdk bootstrap 都会触发代码捆绑。

Docs: If issued with no arguments... the cdk bootstrap command synthesizes the current app and bootstraps the environments its stacks will be deployed to.

所以要cdk bootstrap跳过合成步骤,(a) bootstrap 从应用程序目录外部和 (b) 明确提供帐户和区域:

cdk bootstrap ACCOUNT-NUMBER/REGION # e.g.
cdk bootstrap 1111111111/us-east-1