Skip to content
| Marketplace
Sign in
Visual Studio Code>AI>Bedrock ChatNew to Visual Studio Code? Get it now.
Bedrock Chat

Bedrock Chat

Sudhir Pothineni

|
4 installs
| (0) | Free
AI-powered chat assistant using AWS Bedrock models
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Bedrock Chat - VS Code Extension

AI-powered chat assistant for VS Code using AWS Bedrock models.

Features

  • 🤖 Multiple AI Models: Support for Claude 4.5 Opus, Claude 4.5 Sonnet, Claude 3.7 Sonnet, and Claude 4.5 Haiku
  • 💬 Interactive Chat: Clean, modern chat interface integrated into VS Code
  • 🔄 Streaming Responses: Real-time streaming of AI responses
  • ⚙️ Configurable: Easy AWS profile and region configuration
  • 🎨 Theme Integration: Automatically matches your VS Code theme

Prerequisites

  • VS Code 1.85.0 or higher
  • AWS account with Bedrock access
  • AWS credentials configured locally

Installation

From Source

  1. Clone this repository
  2. Run npm install
  3. Press F5 to open Extension Development Host
  4. The extension will be loaded in the new window

From VSIX (after packaging)

  1. Run npm run package to create a .vsix file
  2. In VS Code, go to Extensions view
  3. Click "..." menu → "Install from VSIX..."
  4. Select the generated .vsix file

Setup

1. Configure AWS Authentication

The extension supports three authentication methods. Choose the one that best fits your needs:

Option A: Profile-Based Authentication (Recommended)

Use AWS CLI profiles for secure credential management.

  1. Configure AWS CLI:

    aws configure --profile your-profile-name
    
  2. In VS Code Settings, set:

    • Auth Method: profile
    • AWS Profile: Your profile name (e.g., default)

Option B: Role-Based Authentication (AssumeRole)

Assume an IAM role for cross-account access or enhanced security.

  1. Configure a base AWS profile (see Option A)

  2. In VS Code Settings, set:

    • Auth Method: role
    • AWS Profile: Base profile to use for assuming the role
    • AWS Role ARN: ARN of the role to assume (e.g., arn:aws:iam::123456789012:role/BedrockRole)
    • AWS Role Session Name: Optional session name (default: bedrock-chat-session)

Option C: Direct Credentials

Use access keys directly (not recommended for production).

⚠️ Security Warning: Storing credentials in VS Code settings is less secure than using profiles or roles. Use this only for testing or temporary access.

In VS Code Settings, set:

  • Auth Method: credentials
  • AWS Access Key ID: Your access key
  • AWS Secret Access Key: Your secret key
  • AWS Session Token: Optional, for temporary credentials

2. Enable Bedrock Models

  1. Log in to AWS Console
  2. Navigate to Amazon Bedrock
  3. Go to "Model access" in the left sidebar
  4. Request access to the models you want to use:
    • Anthropic Claude models
    • Amazon Titan models
    • Meta Llama models

3. Configure Extension Settings

Open VS Code Settings (Cmd/Ctrl + ,) and search for "Bedrock Chat":

  • Auth Method: Choose authentication method (profile, role, or credentials)
  • AWS Profile: Set your AWS profile name (default: "default")
  • AWS Region: Select the region where Bedrock is available (e.g., us-east-1)
  • Default Model: Choose your preferred model
  • Max Tokens: Maximum response length (default: 4096)
  • Temperature: Response creativity 0-1 (default: 0.7)

Usage

Opening the Chat

  1. Click the chat icon in the Activity Bar (left sidebar)
  2. Or use Command Palette (Cmd/Ctrl + Shift + P) → "Bedrock Chat: Open Chat"

Sending Messages

  1. Type your message in the input field
  2. Press Enter or click "Send"
  3. The AI will respond with streaming output

Changing Models

  • Use the dropdown at the top of the chat panel
  • Or use Command Palette → "Bedrock Chat: Change Model"

Clearing History

  • Use Command Palette → "Bedrock Chat: Clear History"

Supported Models

Model ID Best For
Claude 4.5 Opus us.anthropic.claude-opus-4-5-20251101-v1:0 Most powerful, complex tasks
Claude 4.5 Sonnet us.anthropic.claude-sonnet-4-5-20250929-v1:0 Balanced intelligence and speed
Claude 3.7 Sonnet us.anthropic.claude-3-7-sonnet-20250219-v1:0 High capability, lower latency
Claude 4.5 Haiku us.anthropic.claude-haiku-4-5-20251001-v1:0 Fastest, cost-effective

Troubleshooting

"Access Denied" Error

  • Verify your AWS credentials are configured correctly
  • Ensure your IAM user/role has Bedrock permissions:
    {
      "Version": "2012-10-17",
      "Statement": [
        {
          "Effect": "Allow",
          "Action": [
            "bedrock:InvokeModel",
            "bedrock:InvokeModelWithResponseStream"
          ],
          "Resource": "*"
        }
      ]
    }
    

"Model Not Found" Error

  • Check if the model is available in your selected region
  • Verify you have requested access to the model in Bedrock console

"Invalid Profile" Error

  • Verify the profile name in settings matches your AWS credentials file
  • Check that ~/.aws/credentials exists and contains the profile

Development

Building

npm run compile

Watching for Changes

npm run watch

Packaging

npm run package

License

MIT

Contributing

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

Support

For issues and feature requests, please use the GitHub issue tracker.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft