Skip to content

Conversation

HatmanStack
Copy link

What

Secure chatbot widget that connects to existing Bedrock Knowledge Base via Lex V2.

Files

  • template.yaml - CloudFormation stack (Lex bot + API Gateway + Lambda auth)
  • README.md - Deployment guide with JWT auth setup

Architecture

Widget → API Gateway (JWT auth) → Lambda → Lex → Bedrock KB

Deploy

aws cloudformation deploy --template-file template.yaml \
  --stack-name bedrock-chat-widget \
  --parameter-overrides BedrockKnowledgeBaseId="YOUR_KB_ID" JwtSecret="32char_secret" \
  --capabilities CAPABILITY_IAM

Questions

  1. Good for production use?
  2. Security model acceptable?

@rstrahan
Copy link
Contributor

rstrahan commented Sep 25, 2025

Interesting.. Basically Lex Web UI packaged with a LexV2 bot that automatically integrates with the IDP Knowledgebase..
Not had anyone ask for this.. but still.. it's a nice thought.
I can't look at the details just yet, but on first glance I'm thinking that the LexV2 Bot setup to integrate with the BKB is all that's needed.
We don't need new API gateway, afaics.
We don't need to bundle the Lex Web UI either.. Customer could just deploy from the Lex Web UI repo or blog page, and enter the LexV2 bot id.. LexWebUI has it's own optional Cognito integration - we could include a README that shares how to use it.. or reuse the existing IDP solution Cognito IdP.

Also I am gratified to see you know about Lex Web UI.. One of my earliest and longest lasting open source projects here at Amazon (see www.amazon.com/chatbotui) :)

@HatmanStack
Copy link
Author

Just a whim. Wanted to have everything in one place for a RAG drop in system for projects, will play with it. Cool you had your fingers on it.

@rstrahan rstrahan changed the title Add Embeddable Chatbot for Bedrock Knowledge Base DRAFT: Add Embeddable Chatbot for Bedrock Knowledge Base Sep 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants