Skip to main content

AWS Bedrock

Overview

RAGLight supports AWS Bedrock for both LLM inference and embeddings. You can use it as a drop-in replacement for any other provider — just set provider=Settings.AWS_BEDROCK.
langchain-aws is included in RAGLight’s core dependencies. No extra install is needed.

Authentication

Authentication relies on the standard boto3 credential chain — the first available source is used:
  1. Environment variables: AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_DEFAULT_REGION
  2. Credentials file: ~/.aws/credentials
  3. IAM role: automatic when running on EC2, ECS, or Lambda

Supported models

LLM

Newer Claude models require cross-region inference profile IDs. On-demand invocation of recent Claude versions (e.g. Claude 3.7, Claude 4) is not supported with a bare anthropic.* model ID. You must use a cross-region inference profile prefixed with us., eu., or ap. — for example us.anthropic.claude-sonnet-4-5-20250929-v1:0.To list available profiles in your account:

Embeddings

Constants are available in Settings:

Full example


Custom region

By default, AWS_DEFAULT_REGION (env var) or us-east-1 is used. You can override it per-model via the Builder API:

Mix and match

You can combine Bedrock with any other provider. For example, local HuggingFace embeddings with a Bedrock LLM:

Use with raglight serve --ui

You can run the RAGLight REST API + chat UI with Bedrock by creating a .env file:
Then launch:
If you use named profiles in ~/.aws/credentials, prefer setting explicit AWS_ACCESS_KEY_ID / AWS_SECRET_ACCESS_KEY in .env — profile names with special characters (parentheses, spaces) can cause parsing issues.

Summary

  • Set provider=Settings.AWS_BEDROCK in both RAGConfig and VectorStoreConfig
  • No extra install required — langchain-aws is bundled
  • Credentials are resolved automatically via the boto3 chain
  • Region defaults to AWS_DEFAULT_REGION env var or us-east-1
  • Newer Claude models require cross-region inference profile IDs (e.g. us.anthropic.claude-...)
  • Mix Bedrock with any other provider freely