GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — braintrust-sdk-python/examples/bedrock_runtime at main · braintrustdata/braintrust-sdk-python

Expand file tree

/

bedrock_runtime

/
Copy path

Directory actions

More options

More options

Directory actions

More options

More options

Latest commit

 

History

History
History
/

bedrock_runtime

/
Copy path

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
README.md
README.md
 
 
example.py
example.py
 
 
pyproject.toml
pyproject.toml
 
 

README.md

Outline

AWS Bedrock + Braintrust

Calls braintrust.auto_instrument() to patch boto3's Bedrock Runtime client factory, then runs a single client.converse(...) call against Amazon Nova Lite. The trace captures a parent answer_question span plus a child bedrock.converse LLM span with input, output, metadata, and token metrics.

Run

export BRAINTRUST_API_KEY=...
export AWS_BEARER_TOKEN_BEDROCK=...
export AWS_REGION=us-east-1
export AWS_DEFAULT_REGION=us-east-1

uv sync
uv run python example.py

If you use IAM credentials instead of a Bedrock API key, set the usual AWS variables instead:

export AWS_ACCESS_KEY_ID=...
export AWS_SECRET_ACCESS_KEY=...
export AWS_SESSION_TOKEN=... # if using temporary credentials

The default model is us.amazon.nova-lite-v1:0. Override it with BRAINTRUST_BEDROCK_MODEL if needed.

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.