Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add a notice of creating bot stack related to frontend WAF #670

Open
wants to merge 9 commits into
base: v2
Choose a base branch
from
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ This repository is a sample chatbot using the Anthropic company's LLM [Claude](h

![](./docs/imgs/demo.gif)

### Bot Personalization
<details>
<summary>Bot Personalization</summary>

Add your own instruction and give external knowledge as URL or files (a.k.a [RAG](https://aws.amazon.com/what-is/retrieval-augmented-generation/). The bot can be shared among application users. The customized bot also can be published as stand-alone API (See the [detail](./docs/PUBLISH_API.md)).

Expand All @@ -24,6 +25,7 @@ Add your own instruction and give external knowledge as URL or files (a.k.a [RAG

> [!Important]
> For governance reasons, only allowed users are able to create customized bots. To allow the creation of customized bots, the user must be a member of group called `CreatingBotAllowed`, which can be set up via the management console > Amazon Cognito User pools or aws cli. Note that the user pool id can be referred by accessing CloudFormation > BedrockChatStack > Outputs > `AuthUserPoolIdxxxx`.
</details>

### Administrator dashboard

Expand Down Expand Up @@ -64,6 +66,14 @@ By using the [Agent functionality](./docs/AGENT.md), your chatbot can automatica
- Bahasa Melayu 💬
- Tiếng Việt 💬

## Deployment
There are two ways to deploy a chatbot:

- Super-easy deployment: This method is designed for the very first user of BrChat.
fbukevin marked this conversation as resolved.
Show resolved Hide resolved
- Using CDK: Notice that it requires large amount of space to register container layers. Expand your disk of VM for Cloud9 before you deploy.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still not fixed?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah sorry, I removed the previous one, but omitted the later one.


Both method require usig CDK config file in cdk/cdk.js. To use custom bootstrap, please refer to [deploy.md](deploy.md).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only cdk deployment requires modification of cdk.json

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you want to use another qualifier, even using bin.sh requires modification cdk.json.
We had struggle with it very much. Because in deploy.yml, it calls cdk/cdk.json.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I mentioned earlier, the target users for super-easy deployment is "the very first user of BrChat". If need to change options which can only be modified via cdk.json (can not change via arguments on bin.sh), it should be an advanced usage so recommend to use deployment by CDK.

Copy link
Author

@fbukevin fbukevin Jan 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your confirmation. Actually, that's not work easily. Just as a caution, in the same account, the code of this project sometime will encounters resource confliction when deploying multiple chatbot. We collaborate with AWS support and addressed this issue.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Understood. Could you clarify what you're ultimately trying to achieve with this PR?


## 🚀 Super-easy Deployment

- In the us-east-1 region, open [Bedrock Model access](https://us-east-1.console.aws.amazon.com/bedrock/home?region=us-east-1#/modelaccess) > `Manage model access` > Check all of `Anthropic / Claude 3`, all of `Amazon / Nova`, `Amazon / Titan Text Embeddings V2` and `Cohere / Embed Multilingual` then `Save changes`.
Expand Down Expand Up @@ -100,6 +110,9 @@ You can specify the following parameters during deployment to enhance security a
- **--bedrock-region**: Define the region where bedrock is available. (default: us-east-1)
- **--version**: The version of Bedrock Claude Chat to deploy. (default: latest version in development)

> [!Note] Currently, the WAF for CloudFront needs to be created in the North America region (us-east-1), so the stacks are separated. https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafv2-webacl.html
> Since the bin.sh script will create CloudFront automatically with `cdk bootstrap` in region us-east-1 and it must be in region us-east-1 ([doc](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafv2-webacl.html)), if you wish to create a bedrock in other regions, assign the parameter "bedrock-region" as parameter when running bin.sh.

#### Example command with parameters:

```sh
Expand Down