Skip to content

SBrophy-dev/AWS-Bedrock-Chat

Repository files navigation

Bedrock Chat

A modern web-based chat interface for AWS Bedrock foundation models. Chat with Claude, Llama, Mistral, Nova, and many other AI models through a clean, responsive UI.

Bedrock Chat Screenshot

Features

  • Multi-model support - Access 50+ foundation models from Anthropic, Amazon, Meta, Mistral, Cohere, AI21, DeepSeek, Google, OpenAI, Qwen, NVIDIA, and more
  • Streaming responses - Real-time token streaming for faster interactions
  • Conversation management - Create, rename, and delete conversations with persistent history
  • Model discovery - Automatically fetches available models from your Bedrock account
  • Markdown support - Rich formatting with code syntax highlighting
  • Secure - Credentials stay in your browser, never sent to any server except AWS

Prerequisites

  • Node.js 18+
  • An AWS account with Bedrock access
  • IAM credentials with appropriate permissions

Quick Start

  1. Clone the repository

    git clone https://github.com/yourusername/bedrock-chat.git
    cd bedrock-chat
  2. Install dependencies

    npm install
  3. Start the development server

    npm run dev
  4. Open your browser Navigate to http://localhost:5173

  5. Enter your AWS credentials

    • Access Key ID
    • Secret Access Key
    • Region (e.g., us-east-1)
    • Session Token (optional, for temporary credentials)
  6. Start chatting! Select a model and begin your conversation.

AWS Setup

Required IAM Permissions

Your IAM user needs the following permissions:

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "bedrock:InvokeModel",
        "bedrock:InvokeModelWithResponseStream"
      ],
      "Resource": "*"
    },
    {
      "Effect": "Allow",
      "Action": [
        "bedrock:ListFoundationModels",
        "bedrock:ListInferenceProfiles"
      ],
      "Resource": "*"
    }
  ]
}

Model Access

Before using any model, you must request access in the AWS Bedrock console:

  1. Go to AWS Bedrock Console
  2. Navigate to Model access in the left sidebar
  3. Click Modify model access
  4. Select the models you want to use
  5. Save your changes

Architecture

┌─────────────────┐     ┌─────────────────┐     ┌─────────────────┐
│   React Client  │────▶│  Express Server │────▶│  AWS Bedrock    │
│   (Port 5173)   │     │   (Port 3001)   │     │     API         │
└─────────────────┘     └─────────────────┘     └─────────────────┘
  • Frontend: React + TypeScript + Vite
  • Backend: Express.js proxy server
  • AWS SDK: @aws-sdk/client-bedrock and @aws-sdk/client-bedrock-runtime

Available Scripts

Command Description
npm run dev Start both client and server in development mode
npm run dev:client Start only the Vite dev server
npm run dev:server Start only the Express server with hot reload
npm run build Build the client for production
npm run preview Preview the production build

Supported Models

The app supports all Bedrock foundation models including:

  • Anthropic: Claude 3 Haiku, Claude 3.5 Haiku, Claude Sonnet 4/4.5/4.6, Claude Opus 4.1/4.5/4.6
  • Amazon: Nova Micro/Lite/Pro/Premier, Nova 2 Lite, Titan Text
  • Meta: Llama 3, 3.1, 3.2, 3.3, Llama 4 Scout/Maverick
  • Mistral: Mistral 7B, Mixtral 8x7B, Mistral Large, Ministral, Magistral, Devstral, Pixtral
  • Cohere: Command R, Command R+
  • AI21 Labs: Jamba 1.5 Large/Mini
  • DeepSeek: DeepSeek-R1, DeepSeek V3.x
  • Google: Gemma 3 variants
  • OpenAI: GPT OSS models
  • Qwen: Qwen3 variants
  • NVIDIA: Nemotron models
  • Moonshot: Kimi K2 variants
  • Writer: Palmyra X4/X5
  • MiniMax: MiniMax M2/M2.1
  • Z.AI: GLM 4.7 variants

Security Notes

  • Credentials are never stored on any server - They remain in your browser's localStorage (if you enable "Remember credentials") or in memory only
  • No backend credential storage - The Express server only proxies requests to AWS
  • No telemetry or analytics - Your conversations stay private
  • Open source - Audit the code yourself

Tech Stack

License

MIT License - feel free to use this project for any purpose.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Acknowledgments

Built with ❤️ using AWS Bedrock and React.

About

Full-stack AWS Bedrock chat client built with TypeScript - Integrates with Bedrock's InvokeModel API, streaming response handling, multi-model support, and a clean browser-based UI. Fully local, no backend server required.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors