# aws-genai-llm-chatbot: a CDK blueprint for multi-LLM RAG on AWS

> The aws-samples project deploys a React chat UI, a GraphQL API and a RAG pipeline into your own AWS account with a single CDK app. It is a starting point for teams that want the wiring done, not a managed product.

**aws-samples/aws-genai-llm-chatbot** — A modular and comprehensive solution to deploy a Multi-LLM and Multi-RAG powered chatbot (Amazon Bedrock, Anthropic, HuggingFace, OpenAI, Meta, AI21, Cohere, Mistral) using AWS CDK on AWS

- Repository: https://github.com/aws-samples/aws-genai-llm-chatbot
- Website: https://aws-samples.github.io/aws-genai-llm-chatbot/
- Stars: 1,400 · Forks: 436
- Language: TypeScript
- License: MIT-0
- Published: 2026-09-10 · Updated: 2026-09-10 · Language: en
- Canonical page: https://hysenlabs.com/projects/aws-samples-aws-genai-llm-chatbot

## The gap aws-genai-llm-chatbot fills

Most teams that want a chat interface over their own documents end up building the same parts twice: an authentication layer, a document ingestion pipeline, a vector store, a streaming API, and a front end that can render citations. aws-genai-llm-chatbot is a CDK application that provisions that whole set inside your AWS account. The README calls it an "Enterprise-ready generative AI chatbot with RAG capabilities" and lists the pieces it wires together: Amazon Bedrock for model access, OpenSearch for vector storage, S3 for documents, Cognito for authentication, Lambda for serverless processing, API Gateway for the API, and a React web interface.

The intended audience is an engineering team that already runs workloads on AWS and wants a reference implementation rather than a blank page. The model layer is deliberately plural. The README lists Amazon Bedrock (Claude, Llama 2), SageMaker, and custom model endpoints, and the repository description adds Anthropic, HuggingFace, OpenAI, Meta, AI21, Cohere and Mistral. The Python dependency list in pyproject.toml backs that up with langchain-aws, langchain-openai and langchain-community side by side, plus opensearch-py, psycopg2-binary and pgvector for storage.

That breadth is the selling point and also the first thing to think about. A blueprint that supports two vector stores and several model providers has more configuration surface than one that supports a single path, and the configuration is where your deployment will actually succeed or fail.

## How the CDK stack turns config into a running chatbot

The repository is a TypeScript CDK app. package.json declares the bin entry as bin/aws-genai-llm-chatbot.js and the build script as "amplify codegen && tsc", which tells you the front end is generated through Amplify codegen before the TypeScript compiles. The lib/ directory holds the constructs, cli/ and scripts/ hold tooling, and docs/ holds the documentation site published at the project homepage.

The runtime side is Python. pyproject.toml packages lib/shared/layers/python-sdk/python into a Lambda layer, and the dependency list reads like the ingestion and retrieval path: pdfplumber and beautifulsoup4 for parsing, langchain-text-splitters for chunking, feedparser for feeds, opensearch-py and pgvector for the two vector store options, and PyJWT for token handling. Requests to the model go through LangChain wrappers rather than hand-rolled SDK calls.

Data flow, as far as the README and file layout describe it, is conventional RAG. Documents land in S3, a Lambda processes and chunks them, embeddings go into OpenSearch or a pgvector-backed store, and the chat request retrieves context before calling the model. Cognito gates the API and the UI. The README also mentions conversation memory with persistent storage and token usage tracking, so the chat history lives outside the browser session.

One detail worth noting: the repository ships a .graphqlconfig.yml and the build runs Amplify codegen, so the API is GraphQL rather than REST, even though the README describes "API endpoints for integration" in general terms.

## Installing the CDK app and running a first deploy

The README lists prerequisites explicitly: an AWS account with appropriate permissions, AWS CLI configured with credentials, Node.js 18+ and npm, Python 3.8+, and a CDK CLI compatible with aws-cdk-lib 2.206.0 or later. Note the mismatch to check before you start: package.json pins the Node engine to ">=18.0.0 <21.0.0", so Node 22 is outside the declared range even though the README only says 18+.

Install or update the CDK CLI globally and check the version. The README warns that a "Cloud assembly schema version mismatch" error during deployment means your CLI is too old.

```bash
npm install -g aws-cdk@latest
cdk --version
```

After cloning the repository, install dependencies and build. The build script runs Amplify codegen first, so it needs to succeed before the TypeScript step.

```bash
npm install
npm run build
```

The deployment scripts are defined in package.json. The README states that deployment is automated with AWS CDK and SeedFarmer, so the plain CDK path is the shorter one and SeedFarmer is the multi-account route.

```bash
npx cdk deploy
```

For iterating on stack changes without a full CloudFormation rollout, package.json also defines a hotswap script and a watch script, both thin wrappers around cdk deploy --hotswap and cdk watch. Expect the first deploy to take a while: Cognito, OpenSearch, API Gateway, Lambda layers and a CloudFront distribution are all part of the stack. When it finishes, CDK prints the outputs, which include the web interface URL. The README does not document a destroy or rollback procedure, so plan for cdk destroy yourself if you are only evaluating.

## Where the blueprint will bite you

The honest limitation is that this is a sample, not a product. The repository lives under aws-samples, and the version numbers disagree across files: package.json says 5.0.0, pyproject.toml says 5.0.38, and the most recent GitHub release listed is v5.0.0 from 2025-01-23. That gap is normal for a repo where the Python package and the CDK app release on different cadences, but it means you should read the file you are actually installing rather than trusting a version string in the README.

Second, the stack is heavy by design. OpenSearch, Cognito, API Gateway, Lambda and CloudFront all have ongoing cost, and the README's cost optimization feature is token usage tracking, not a spending cap. If your use case is a single internal FAQ bot with a few hundred documents, this blueprint provisions more infrastructure than the problem needs, and a smaller Lambda plus a managed vector store would be cheaper to run and easier to reason about.

Third, the multi-provider story is a configuration story. Supporting Bedrock, SageMaker, OpenAI, HuggingFace and the GenAIEH Gateway means the model selection lives in CDK config and in the Python layer, and a misconfigured provider shows up as a runtime failure rather than a deployment error. The README does not document rollback, and it does not describe what happens to existing conversations or indexed documents when you change the vector store configuration. Treat both as things you verify in a throwaway account before touching anything shared.

Finally, the documentation in the README is thin. It points at the GitHub repository for complete documentation, and the homepage is a published docs site, but the README itself gives prerequisites, a CDK version warning, and a sentence about SeedFarmer. Budget time for reading lib/ and docs/ rather than expecting the README to carry you.

## How it compares with Bedrock Knowledge Bases and a hand-rolled stack

The closest managed alternative is Amazon Bedrock Knowledge Bases, which handles ingestion, chunking, embedding and retrieval as a service. The difference in approach is ownership. Knowledge Bases gives you a managed retrieval layer and you build the chat UI and API around it. aws-genai-llm-chatbot gives you the whole vertical slice, including the UI, and you own the CDK stack, the Lambda code and the vector store. If your team wants to customize chunking, swap embedding models, or inspect retrieval at the code level, the blueprint is the more direct path. If you want fewer moving parts and are happy with the managed retrieval behaviour, Knowledge Bases removes a large amount of the code you would otherwise maintain.

Against a hand-rolled LangChain application, the trade is time versus control. Building the same thing yourself means writing the ingestion Lambda, the Cognito authorizer, the GraphQL schema and the React client, which is weeks of work the blueprint has already done. The cost is that you inherit its opinions: GraphQL instead of REST, OpenSearch or pgvector instead of whatever you would have picked, and a CDK structure you now have to upgrade when aws-cdk-lib moves.

There is also a naming trap. Searching for this project returns results about AWS Chatbot, which is a different service for routing alerts into Slack and Microsoft Teams. That service has nothing to do with LLM chat or RAG. If you are reading documentation and it talks about Slack channels and CloudWatch alarms, you are on the wrong page.

## Maintenance, upgrades and the MIT-0 licence

The repository is not archived, and the last push was on 2026-06-30, which is recent enough that the code is being touched. That said, the release history is uneven: v5.0.0 landed on 2025-01-23, and before that v4.0.14 on 2024-08-07 and v4.0.13 on 2024-06-24. Long stretches between tagged releases are worth knowing about if you depend on release notes to plan upgrades.

The upgrade cost is the CDK version. The README explicitly ties the CLI to aws-cdk-lib 2.206.0 or later and warns about the cloud assembly schema mismatch, which is the failure you will hit when the CLI and the library drift apart. Since package.json pins Node to ">=18.0.0 <21.0.0", upgrading Node is a separate decision from upgrading CDK, and the two constraints can conflict if your CI image ships a newer Node by default.

The licence is MIT-0, which is the permissive MIT licence with the attribution requirement removed. For most adopters that is the least restrictive option available and removes the notice-file question entirely. This is not legal advice; if your organization has a licence review process, MIT-0 is the identifier to hand it.

## Conclusion

Adopt it if you want a deployable reference for Bedrock plus RAG inside your own account and you are willing to own the CDK stack afterwards. Do not adopt it if you need a hosted service or cannot run CDK. Before deploying, check that your CDK CLI matches aws-cdk-lib 2.206.0, confirm the Node engine range in package.json, and decide which vector store and model provider you actually want, because those choices are made in the CDK config, not in the UI.

## FAQ

### Does aws-genai-llm-chatbot deploy into my own AWS account?

Yes. The README describes it as a blueprint that deploys the complete solution in your AWS account using AWS CDK, and the deployment section states the process is automated with AWS CDK and SeedFarmer.

### Which LLMs can aws-genai-llm-chatbot use?

The README lists Amazon Bedrock (Claude, Llama 2), SageMaker and custom model endpoints, and the repository description adds Anthropic, HuggingFace, OpenAI, Meta, AI21, Cohere and Mistral. The Python dependencies include langchain-aws, langchain-openai and langchain-community to support those providers.

### Does AWS host the models that aws-genai-llm-chatbot calls?

The README names Amazon Bedrock for LLM access, which is an AWS service, and SageMaker plus custom model endpoints as alternatives. The blueprint also supports connecting to the GenAIEH Gateway for additional model access.

### What is Amazon's AI chatbot called?

This repository is the aws-samples aws-genai-llm-chatbot, an AWS CDK blueprint you deploy yourself rather than a branded AWS service. The README describes it as an enterprise-ready generative AI chatbot with RAG capabilities and names Amazon Bedrock as the LLM access layer.

## Sources

- [aws-samples/aws-genai-llm-chatbot on GitHub](https://github.com/aws-samples/aws-genai-llm-chatbot)
- [License: MIT-0](https://github.com/aws-samples/aws-genai-llm-chatbot/blob/main/LICENSE)
- [Project website](https://aws-samples.github.io/aws-genai-llm-chatbot/)
- [README](https://github.com/aws-samples/aws-genai-llm-chatbot/blob/main/README.md)
- [Releases](https://github.com/aws-samples/aws-genai-llm-chatbot/releases)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/aws-samples-aws-genai-llm-chatbot
