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 setprovider=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:- Environment variables:
AWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEY,AWS_DEFAULT_REGION - Credentials file:
~/.aws/credentials - IAM role: automatic when running on EC2, ECS, or Lambda
Supported models
LLM
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:
Summary
- Set
provider=Settings.AWS_BEDROCKin bothRAGConfigandVectorStoreConfig - No extra install required —
langchain-awsis bundled - Credentials are resolved automatically via the boto3 chain
- Region defaults to
AWS_DEFAULT_REGIONenv var orus-east-1 - Newer Claude models require cross-region inference profile IDs (e.g.
us.anthropic.claude-...) - Mix Bedrock with any other provider freely