[英]AWS CDK: Don't build assets when running 'cdk bootstrap' command
I bundle my assets using Docker & Dockerfile:我使用 Docker 和 Dockerfile 捆绑我的资产:
Code.from_docker_build(
path='/path',
build_args={},
)
Every time I run cdk deploy
or cdk bootstrap
the code bundling is triggered.每次我运行cdk deploy
或cdk bootstrap
时都会触发代码捆绑。
cdk deploy
action code bundling makes sense.在cdk deploy
操作代码捆绑是有意义的。cdk bootstrap
command the code bundling should not be triggered.但是在cdk bootstrap
命令上不应触发代码捆绑。 Is there any way to avoid code bundling during cdk bootstrap
?有什么办法可以避免在cdk 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. 文档:如果没有发布 arguments... cdk bootstrap 命令综合当前应用程序并引导其堆栈将部署到的环境。
So to have cdk bootstrap
skip the synth step, (a) bootstrap from outside the app directory and (b) explicitly provide the account and region:因此,要让cdk bootstrap
跳过合成步骤,(a) 从 app 目录外部引导和 (b) 明确提供帐户和区域:
cdk bootstrap ACCOUNT-NUMBER/REGION # e.g.
cdk bootstrap 1111111111/us-east-1
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.