bedrock-claude-chat
bedrock-claude-chat copied to clipboard
[BUG]Failing installation from CloudShell
🚨 Failing on running bin.sh from CloudShell 🚨
Running the bin.sh install file from CloudShell results in failure for FrontEndWafStack.
🐞Description
Running the bin.sh install script installs the Bedrock stack, but fails after trying to install FrontEndWafStack.
🔄 To Reproduce
Steps to reproduce the behavior:
- Run CloudShell
- Run sudo yum upgrade
- Run sudo npm upgrade
- run bin.sh script: ./bin.sh --enable-lambda-snapstart --allowed-signup-email-domains "example.com,example2.com" --bedrock-region "us-west-2" --ipv4-ranges "x.x.x.x/32,y.y.y.y/32"
📷 Screenshots
Log from CloudBuild log:
BedrockChatStack: success: Built eac68656713ea7c0776cb28a1db6cde5a85d3f19a86be1654c912cbf43ab9d2b:current_account-us-west-2
--
1541 |
1542 | NOTICES (What's this? https://github.com/aws/aws-cdk/wiki/CLI-Notices)
1543 |
1544 | 32775 (cli): CLI versions and CDK library versions have diverged
1545 |
1546 | Overview: Starting in CDK 2.179.0, CLI versions will no longer be in
1547 | lockstep with CDK library versions. CLI versions will now be
1548 | released as 2.1000.0 and continue with 2.1001.0, etc.
1549 |
1550 | Affected versions: cli: >=2.0.0 <=2.1005.0
1551 |
1552 | More information at: https://github.com/aws/aws-cdk/issues/32775
1553 |
1554 |
1555 | If you don’t want to see a notice anymore, use "cdk acknowledge <id>". For example, "cdk acknowledge 32775".
1556 | ❌ FrontendWafStack failed: _ToolkitError: The stack named FrontendWafStack failed to deploy: UPDATE_ROLLBACK_COMPLETE
1557 |
1558 | [Container] 2025/04/17 19:51:35.539041 Command did not exit successfully npx cdk deploy --require-approval never --all exit status 1
1559 | [Container] 2025/04/17 19:51:35.571902 Phase complete: BUILD State: FAILED
1560 | [Container] 2025/04/17 19:51:35.571946 Phase context status code: COMMAND_EXECUTION_ERROR Message: Error while executing command: npx cdk deploy --require-approval never --all. Reason: exit status 1
1561 | [Container] 2025/04/17 19:51:35.623095 Entering phase POST_BUILD
1562 | [Container] 2025/04/17 19:51:35.626816 Phase complete: POST_BUILD State: SUCCEEDED
📝 Additional context
Have tried different iterations, can't seem to get it to work.
We have an existing previous instance of the bedrock chat app running. We were hoping to keep that one running, start the new one, and decommission the old once the users are moved to the new one. The issue is that the CF stacks names don't seem to be easily changed. Changing the variable names in cdk/lib/frontend-waf-stack.ts and cdk/bin/bedrock-chat.ts don't seem to truly change the actual CF stack names that try to build. The BedrockRegionResourcesStack builds fine, but since there is a previous FrontendWafStack stack in place, the build stack fails. Is there another way to actually name the stacks that would allow for a deployment like this?
Have you seen the updated Migration Guide? Based on the issues you are describing you might be able to leverage the migration steps - https://github.com/aws-samples/bedrock-chat/blob/v3/docs/migration/V2_TO_V3.md
See: https://github.com/aws-samples/bedrock-chat?tab=readme-ov-file#deploying-multiple-environments
Migration is not the initial goal here. I'm looking to deploy multiple environments and you cannot specify the environment (dev, prod, etc.) in the bin.sh script, only in the cdk/npx context. Building this way in Cloud Shell is not possible, as there's not enough storage to build the docker images. Building with cdk/npx is difficult/impossible without docker access at the workstation. It would be better if this could be a pipeline that would build based on a configured CF script.
The easy deployment method i.e. bin.sh is prepared for the very first user. We strongly recommend to prepare the docker environment to utilize CDK.
This issue has been labeled as "stale" due to no response by the reporter within 1 month (and 14 days after last commented by someone). And it will be closed automatically 14 days later if not responded.
This issue has been closed due to no response within 14 days after labeled as "stale", 14 days after last reopened, and 14 days after last commented.