diff --git a/cli/magic-create.ts b/cli/magic-create.ts index b3b14dd7f..671ec8059 100644 --- a/cli/magic-create.ts +++ b/cli/magic-create.ts @@ -9,6 +9,7 @@ import { SupportedRegion, SupportedSageMakerModels, SystemConfig, + SupportedBedrockRegion } from "../lib/shared/types"; import { LIB_VERSION } from "./version.js"; import * as fs from "fs"; @@ -154,13 +155,7 @@ async function processCreateOptions(options: any): Promise { 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; diff --git a/docs/.vitepress/config.mts b/docs/.vitepress/config.mts index 2111e18e0..c595cc5ab 100644 --- a/docs/.vitepress/config.mts +++ b/docs/.vitepress/config.mts @@ -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' }, diff --git a/docs/documentation/private-chatbot.md b/docs/documentation/private-chatbot.md new file mode 100644 index 000000000..e074c5903 --- /dev/null +++ b/docs/documentation/private-chatbot.md @@ -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. diff --git a/docs/guide/deploy.md b/docs/guide/deploy.md index cbfd49663..022f617ab 100644 --- a/docs/guide/deploy.md +++ b/docs/guide/deploy.md @@ -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. diff --git a/lib/shared/types.ts b/lib/shared/types.ts index 5269c1294..4df16a7d0 100644 --- a/lib/shared/types.ts +++ b/lib/shared/types.ts @@ -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 {