- Symptom
- Cloud assembly schema version mismatch: Maximum schema version supported is 39.x.x, but found 40.0.0Fails on cdk synth, diff, or deploy right after bumping aws-cdk-libPinning aws-cdk to the same version number as aws-cdk-lib no longer works
- Cause
- The CDK CLI moved to its own version line starting at 2.1000.0 in early 2025, and aws-cdk-lib 2.182.0 and later need that newer CLI. Pinning both packages to the same number leaves the CLI too old.
- Fix
- Upgrade the CLI to the latest 2.1xxx release, which reads every older schema. Use npx with the project-local CLI in CI so a stale global install is not picked up.
- Apply
npm install --save-dev aws-cdk@latest # CLI is 2.1000.0 or later npx cdk --version npx cdk deploy- Affected
- aws-cdk-lib 2.182.0 and later with aws-cdk CLI below 2.1000.0; CLI and library versioned separately since CLI 2.1000.0 on 2025-02-18
- Sources
Last verified 2026-10-15 · Confirmed by 0 builders