Use this file to discover all available pages before exploring further.
AWS Bedrock provides access to foundation models from Anthropic, Meta, Mistral, Amazon, and more. HoneyHive integrates with Bedrock via the OpenInference instrumentor, automatically capturing all model invocations and Converse API calls.
Add HoneyHive tracing in just 4 lines of code. Add this to your existing Bedrock app and all model invocations, Converse API calls, and streaming are automatically traced.
To see where to initialize the tracer for your environment, including AWS Lambda and long-running servers, see Tracer Initialization.
pip install "honeyhive[openinference-aws-bedrock]"# Or install separatelypip install honeyhive "openinference-instrumentation-bedrock>=0.1.0" "boto3>=1.26.0"
import osfrom honeyhive import HoneyHiveTracerfrom openinference.instrumentation.bedrock import BedrockInstrumentortracer = HoneyHiveTracer.init( api_key=os.getenv("HH_API_KEY"), project=os.getenv("HH_PROJECT"),)BedrockInstrumentor().instrument(tracer_provider=tracer.provider)# Your existing Bedrock code works unchanged
HoneyHive’s Bedrock integration is tested against the following versions on PyPI, as of April 2026. Newer patch releases are generally safe; if you hit an issue, pin to these versions to reproduce a known-good configuration.
Use cross-region inference profiles for newer Anthropic models in us-east-1 and us-west-2. Prefix the model ID with us. (e.g. us.anthropic.claude-haiku-4-5-20251001-v1:0) to enable on-demand throughput via cross-region routing. Older model IDs without the prefix may trigger a ResourceNotFoundException — see Troubleshooting below.
import osimport boto3from honeyhive import HoneyHiveTracerfrom openinference.instrumentation.bedrock import BedrockInstrumentortracer = HoneyHiveTracer.init(project=os.getenv("HH_PROJECT"))BedrockInstrumentor().instrument(tracer_provider=tracer.provider)bedrock = boto3.client("bedrock-runtime", region_name="us-west-2")# Cross-region inference profile (recommended for on-demand throughput)model_id = "us.anthropic.claude-haiku-4-5-20251001-v1:0"response = bedrock.converse( modelId=model_id, messages=[ {"role": "user", "content": [{"text": "What is the capital of France?"}]} ], inferenceConfig={"maxTokens": 100},)print(response["output"]["message"]["content"][0]["text"])
If you see ResourceNotFoundException: Access denied. This Model is marked by provider as Legacy, the model has been deprecated by its provider on Bedrock. Switch to a supported model using a cross-region inference profile:
# ❌ Direct model ID - may fail with legacy errormodel_id = "anthropic.claude-3-haiku-20240307-v1:0"# ✅ Cross-region inference profile - recommendedmodel_id = "us.anthropic.claude-haiku-4-5-20251001-v1:0"
If your project already uses Traceloop / OpenLLMetry, you can use its Bedrock instrumentor instead of OpenInference. The setup is identical - only the install and import paths differ.
pip install "honeyhive[traceloop-aws-bedrock]"
from honeyhive import HoneyHiveTracerfrom opentelemetry.instrumentation.bedrock import BedrockInstrumentortracer = HoneyHiveTracer.init(project="your-project")BedrockInstrumentor().instrument(tracer_provider=tracer.provider)