AWS CDK "bootstrap stack version ... required ... found" too low in CI
CDK pins a minimum bootstrap stack version for each CLI release. Your environment was bootstrapped by an older CLI, so the deployed toolkit version is below what the current synth/deploy needs.
What this error means
cdk deploy fails with "This CDK deployment requires bootstrap stack version \"X\", found \"Y\". Please run \"cdk bootstrap\"." It usually follows a CDK CLI upgrade in CI.
MyAppStack: This CDK deployment requires bootstrap stack version '6', found '4'.
Please run 'cdk bootstrap'.Common causes
A CLI upgrade outran the bootstrap stack
CI now runs a newer aws-cdk that requires a higher bootstrap template version than the one currently deployed in the account.
The toolkit stack was never re-bootstrapped
Bootstrap templates evolve (new permissions, lifecycle rules). An old CDKToolkit lacks fields the new CLI expects.
How to fix it
Re-run bootstrap with the current CLI
Bootstrapping again upgrades the toolkit stack in place to the required version.
cdk bootstrap aws://123456789012/us-east-1Pin the CDK CLI to match the bootstrap
If you cannot re-bootstrap immediately, pin the CLI to a version compatible with the deployed toolkit.
npm install --save-dev aws-cdk@2.140.0How to prevent it
- Re-bootstrap target environments after upgrading the CDK CLI.
- Keep the CLI version pinned in package.json so upgrades are deliberate.
- Run a bootstrap step before deploy on long-lived accounts.