Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AWS CDK and caching the cdk.out directory in build pipelines

I am using BitBucket pipelines to deploy an app to AWS using the Python CDK. As part of the process the cloud assembly cdk.out directory is created as documents in the AWS docs.

I am wondering if there is any benefit in caching this directory so that it's reused between pipeline runs, just like we cache pip dependencies for example, or just let it be created from scratch on every pipeline run.

like image 239
garyj Avatar asked Nov 01 '25 12:11

garyj


1 Answers

cdk deploy synthesizes the CloudAssembly artifacts into cdk.out each time before deploying. Caching wouldn't help there.

However, the CDK apparently caches zipped artifacts (before uploading to S3), so in theory you could save .zip-ing time by caching cdk.out/.cache.

like image 63
fedonev Avatar answered Nov 03 '25 02:11

fedonev



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!