Skip to content

Commit

Permalink
added docs for private chatbot, updated CLI to use SupportedBedrockRe…
Browse files Browse the repository at this point in the history
…gion type
  • Loading branch information
manuwaik committed Jan 30, 2024
1 parent 990bfed commit 795c245
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 7 deletions.
9 changes: 2 additions & 7 deletions cli/magic-create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
SupportedRegion,
SupportedSageMakerModels,
SystemConfig,
SupportedBedrockRegion
} from "../lib/shared/types";
import { LIB_VERSION } from "./version.js";
import * as fs from "fs";
Expand Down Expand Up @@ -154,13 +155,7 @@ async function processCreateOptions(options: any): Promise<void> {
type: "select",
name: "bedrockRegion",
message: "Region where Bedrock is available",
choices: [
SupportedRegion.US_EAST_1,
SupportedRegion.US_WEST_2,
SupportedRegion.EU_CENTRAL_1,
SupportedRegion.AP_SOUTHEAST_1,
SupportedRegion.AP_NORTHEAST_1,
],
choices: Object.values(SupportedBedrockRegion),
initial: options.bedrockRegion ?? "us-east-1",
skip() {
return !(this as any).state.answers.bedrockEnable;
Expand Down
1 change: 1 addition & 0 deletions docs/.vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export default defineConfig({
{
text: 'Documentation',
items: [
{ text: 'Private Chatbot', link: '/documentation/private-chatbot' },
{ text: 'Model Requirements', link: '/documentation/model-requirements' },
{ text: 'Inference Script', link: '/documentation/inference-script' },
{ text: 'Document Retrieval', link: '/documentation/retriever' },
Expand Down
28 changes: 28 additions & 0 deletions docs/documentation/private-chatbot.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Private Chatbot

Allows the deployment of a private chatbot via the 'npm run create' CLI setup.

- VPC only accessible website with an Application Load Balancer in front of an S3 hosted website.
- Private Appsync APIs and Web Sockets
- VPC endpoints for AWS services
- Utilises a AWS Private CA certifice
- Utilises a Amazon Route 53 Private Hosted Zone and Domain


### Prerequisites: Private Chatbot Deployment
1. [AWS Private CA issued ACM certificate](https://docs.aws.amazon.com/acm/latest/userguide/gs-acm-request-private.html) for your chosen domain. (i.e. chatbot.example.org)
2. A Route 53 [Private Hosted Zone](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/hosted-zones-private.html) (i.e. for example.org)

### During 'npm run create'
```shellsession
$ ✔ Do you want to deploy a private website? I.e only accessible in VPC (Y/n) ·
true
$ ✔ ACM certificate ARN ·
arn:aws:acm:us-east-1:1234567890:certificate/12345678-1234-1234-1234-12345678
$ ✔ Domain for private website ·
chatbot.example.org
```

### After Private Deployment:
1. In Route 53 [link the created VPC to the Private Hosted Zone (PHZ)](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/hosted-zone-private-associate-vpcs.html)
2. In the PHZ, [add an "A Record"](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-to-elb-load-balancer.html) with your chosen subdomain (i.e. chatbot.example.org) that points to the website Application Load Balancer Alias.
1 change: 1 addition & 0 deletions docs/guide/deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ You'll be prompted to configure the different aspects of the solution, such as:

- The LLMs or MLMs to enable (we support all models provided by Bedrock along with SageMaker hosted Idefics, FalconLite, Mistral and more to come)
- Setup of the RAG system: engine selection (i.e. Aurora w/ pgvector, OpenSearch, Kendra..) embeddings selection and more to come.
- Private Chatbot: Limit accessibility to website and backend to VPC.

When done, answer `Y` to create a new configuration.

Expand Down
1 change: 1 addition & 0 deletions lib/shared/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ export enum SupportedBedrockRegion {
EU_CENTRAL_1 = "eu-central-1",
US_EAST_1 = "us-east-1",
US_WEST_2 = "us-west-2",
US_WEST_1 = "us-west-1"
}

export enum ModelInterface {
Expand Down

0 comments on commit 795c245

Please sign in to comment.