GAIA Chatbot Starter Package
The GAIA Chatbot Starter Package deploys a production-ready GenAI chatbot backend using Amazon Bedrock Knowledge Bases, Guardrails, and serverless APIs. You provide the frontend application and documents for the knowledge base; the starter kit deploys the full backend.
GAIA Chatbot starter kit architecture
This architecture is particularly effective when:
-
You need a RAG-powered chatbot with enterprise authentication.
-
You need document Q&A over internal knowledge bases (PDF, TXT, MD, HTML, DOCX).
-
You need real-time streaming chat via WebSocket (AppSync Events).
-
You need content-filtered AI responses with Bedrock Guardrails.
Authentication and API Components
-
Cognito User Pool - Email/password or enterprise SSO authentication
-
REST API (API Gateway) - Session management, feedback, and admin operations
-
WebSocket API (AppSync Events) - Real-time chat streaming
-
CloudFront CDN - Serves
aws-exports.jsonconfiguration -
WAF - Optional web application firewall
GenAI Components
-
Bedrock Knowledge Base - OpenSearch Serverless vector store
-
Bedrock Guardrails - Content filtering and PII protection
-
VPC-Deployed Lambda Functions - Serverless compute for API handlers
-
KMS-Encrypted S3 Data Lake - Document storage
Deployment Instructions
Manual CLI Deploy Method
Prerequisites
Before deploying the GAIA Chatbot Starter Package using the CLI method, verify you have:
-
AWS CLI configured with appropriate credentials
-
Node.js 22.x or later and npm/npx 10.x or later installed
-
AWS CDK bootstrapped in your target account and region
-
If deploying outside
us-east-1: also bootstrap CDK inus-east-1in the same account. CloudFront WAF resources must be deployed inus-east-1; the module creates a cross-region stack there automatically via theadditional_stacksconfiguration. -
A VPC with private subnets and a NAT Gateway (required — AppSync Events has no VPC endpoint).
-
Bedrock model access enabled in the AWS console for your target region.
Deployment Steps
Step 1: Scaffold your project
npx @aws-mdaa/cli init my_gaia_chatbot --starter-kit genai_gaia_chatbot cd my_gaia_chatbot
Step 2: Configure your deployment
-
Edit
mdaa.yaml:
organization: <your-unique-org-name> context: vpc_id: <your vpc id> app_subnet_id_1: <private subnet with NAT route> app_subnet_id_2: <private subnet with NAT route> data_subnet_id_1: <data subnet> data_subnet_id_2: <data subnet> inference_model_arn: <Bedrock model ARN or inference profile ARN> embedding_model: <embedding model ID> waf_allowed_cidrs: [<your ip>, <NAT gateway IP>]
Step 3: Deploy the solution
npx @aws-mdaa/cli ls npx @aws-mdaa/cli synth npx @aws-mdaa/cli deploy
Step 4: Verify deployment
-
Verify the Cognito User Pool, API Gateway REST API, AppSync API, CloudFront distribution, Bedrock Knowledge Base, and OpenSearch Serverless collection are created.
Usage Instructions
-
Upload documents — Upload documents to the S3 data lake under
data/bedrock-knowledge-base/and sync the knowledge base in the Bedrock console. -
Fetch
aws-exports.json— CloudFront serves the config file consumed by your frontend application. -
Authenticate a user — Create a Cognito user (or configure external SSO) and sign in from your frontend.
-
Chat via WebSocket — The AppSync Events API streams responses in real time; WAF must allow your NAT Gateway’s public IP for responses to reach Lambda.
For more detailed information, refer to the README.md and docs/USAGE.md files in the starter_kits/genai_gaia_chatbot directory of the MDAA repository.