Nexus
1.x
Docs/Nexus/Amazon Bedrock
Open

Reading1 min
Updated31 Jul 2026
Sourcev1/providers/bedrock.mdx

The Amazon Bedrock provider connects to the AWS Bedrock Converse API. It uses AWS SigV4 request signing instead of API keys, and the Converse API format instead of OpenAI's.

Installation01

import "github.com/xraph/nexus/providers/bedrock"

Quick Start02

provider := bedrock.New(
    os.Getenv("AWS_ACCESS_KEY_ID"),
    os.Getenv("AWS_SECRET_ACCESS_KEY"),
    "us-east-1",
)

gw := nexus.New(
    nexus.WithProvider(provider),
)

Options03

OptionDescription
bedrock.WithBaseURL(url)Override the API base URL (default: constructed from region)
bedrock.WithSessionToken(token)AWS session token for temporary credentials

Capabilities04

CapabilitySupported
ChatYes
StreamingYes
EmbeddingsNo
VisionNo
ToolsYes
ThinkingNo

Authentication05

Bedrock uses AWS credentials instead of API keys:

// Standard credentials
provider := bedrock.New(accessKeyID, secretAccessKey, region)

// With temporary session token (STS)
provider := bedrock.New(accessKeyID, secretAccessKey, region,
    bedrock.WithSessionToken(sessionToken),
)

Models06

ModelContextMax OutputInput PriceOutput Price
anthropic.claude-3-5-sonnet-20241022-v2:0200K8,192$3.00/M$15.00/M
meta.llama3-1-70b-instruct-v1:0131K4,096$2.65/M$3.50/M
amazon.titan-text-express-v18,1924,096$0.20/M$0.60/M