## What this fixes

A user following the bedrock-agent-cdk example in amazon-bedrock-samples hit a wall running cdk bootstrap. TypeScript refused to compile: error TS2307 Cannot find module 'path' (plus 'glob' and 'aws-cdk-lib'). They had already run npm install in the sample root, but it died with an ERESOLVE peer dependency conflict: @aws-cdk/aws-lambda-python-alpha@2.108.0-alpha.0 requires aws-cdk-lib ^2.108.0 while the project pinned aws-cdk-lib@2.87.0. Context: the bedrock-agent-cdk CDK example, CDK v2.

## The fix

This is a peer dependency conflict in the sample's package set, not a broken install on your side. First run npm install from the bedrock-agent-cdk root directory before cdk bootstrap. If npm install fails with ERESOLVE (aws-cdk-lib@2.87.0 vs @aws-cdk/aws-lambda-python-alpha@2.108.0-alpha.0 wanting aws-cdk-lib ^2.108.0), run npm install --force to get past it. The reporter confirmed the deploy worked after that, and the sample README was updated to document the install step. The lambda-python-alpha construct is not actually needed and can be left out. Source: https://github.com/aws-samples/amazon-bedrock-samples/issues/40

## Why it happens

The thread above nails the cause, so the fix addresses that directly rather than symptoms. Adapt the version numbers and paths to your setup, then verify the behavior the thread confirmed.

## Source

https://github.com/aws-samples/amazon-bedrock-samples/issues/40