CI Perf Lint

cdk-bucket-deployment-memory-unconfigured

What it flags

CDK code that uses BucketDeployment without setting the memoryLimit property, on projects where the memory default is still relevant.

Why it matters

BucketDeployment uses a Lambda-backed custom resource. Before aws-cdk-lib 2.267.0 the default was 128 MB, which can throttle S3 sync to tens of KB/s and cause slow deploys or 15-minute timeouts on non-trivial website assets. aws-cdk-lib 2.267.0 raises the default memory limit to 1024 MB.

Prefer upgrading, or set memoryLimit explicitly:

new BucketDeployment(this, "Deployment", {
  sources: [Source.asset("./dist")],
  destinationBucket: bucket,
  memoryLimit: 1024,
});

Verification

Compare the deploy step duration before and after upgrading aws-cdk-lib or setting memoryLimit.

Caveats