Connect AWS Bedrock
Connect AWS Bedrock — easy-to-understand guide based on official docs
Think of Amazon Bedrock as a giant vending machine for AI models—instead of snacks, it serves up powerful language models from Anthropic, Meta, and others, all with one simple payment method: your AWS account.
What You’ll Need
Before we start, make sure you have:
- An AWS account (free tier works fine)
- AWS credentials—these are like your ID card. You can use:
- An IAM role if you’re on EC2/ECS/Lambda (zero setup!)
AWS_ACCESS_KEY_ID+AWS_SECRET_ACCESS_KEYenvironment variables- An
AWS_PROFILEfor SSO or named profiles - Just run
aws configurefor local development
Step 1: Install Hermes with Bedrock Support
Open your terminal and run:
cd ~/.hermes/hermes-agent
uv pip install -e ".[bedrock]"
This adds the Bedrock “plug-in” to your Hermes installation. Think of it like installing a language pack on your phone.
Step 2: Tell Hermes to Use Bedrock
Run this command to pick your provider:
hermes model
When prompted:
- Choose “More providers…”
- Select “AWS Bedrock”
- Pick your region (like
us-east-2) - Choose a model (e.g., Claude Sonnet 4)
Hermes will automatically save your settings. Your ~/.hermes/config.yaml will look something like:
model:
default: us.anthropic.claude-sonnet-4-6
provider: bedrock
base_url: https://bedrock-runtime.us-east-2.amazonaws.com
bedrock:
region: us-east-2
Step 3: Start Chatting
hermes chat
That’s it! You’re now talking to a model through AWS Bedrock.
Setting Your Region
You can set your AWS region in three ways (highest priority first):
- Add
regionunderbedrock:in your config file - Set the
AWS_REGIONenvironment variable - Set the
AWS_DEFAULT_REGIONenvironment variable
If you don’t set it, Hermes defaults to us-east-1.
Extra: Guardrails (Safety Filters)
Want to add content filters? Add this to your config:
bedrock:
region: us-east-2
guardrail:
guardrail_identifier: "abc123def456" # From Bedrock console
guardrail_version: "1" # Or "DRAFT"
stream_processing_mode: "async" # "sync" or "async"
trace: "disabled" # "enabled", "disabled", "enabled_full"
Model Discovery
Hermes automatically finds available models in your region. You can customize which ones it shows:
bedrock:
discovery:
enabled: true
provider_filter: ["anthropic", "meta"]
Summary
Connecting AWS Bedrock to Hermes is like plugging a new game console into your TV—install the driver, pick your game, and play. You get access to top-tier models with AWS’s security and reliability.
Practical tip: If you’re running on EC2 or Lambda, skip the API keys entirely. Just attach an IAM role with AmazonBedrockFullAccess and Hermes will detect it automatically. No config, no hassle—just pure AI power.
📖 Official Docs
This article is based on the official Hermes Agent documentation:Official docs › guides/aws-bedrock