Laimonas Sutkus
Laimonas Sutkus

Reputation: 3607

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

I bundle my assets using Docker & Dockerfile:

Code.from_docker_build(
    path='/path',
    build_args={},
)

Every time I run cdk deploy or cdk bootstrap the code bundling is triggered.

Upvotes: 1

Views: 1267

Answers (1)

fedonev
fedonev

Reputation: 25679

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

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 ACCOUNT-NUMBER/REGION # e.g.
cdk bootstrap 1111111111/us-east-1

Upvotes: 2

Related Questions