Recorder
Amazon Bedrock
Wrap each Converse or InvokeModel call. Model names such as us.anthropic.claude-sonnet-5-v1:0 are matched to the price table automatically.
- Copy
harness_recorder.pyinto your service (Lambda, ECS or EC2). - Wrap each call;
usage_fromreads Converse usage and the Anthropic usage block. - Download the events from CloudWatch with your own AWS access.
Download from CloudWatch (you run this)
aws logs filter-log-events --log-group-name <group> \
--start-time $(($(date +%s) - 2592000))000 \
--filter-pattern '{ $.workflow_id = "<workflow>" }' \
--query 'events[].message' --output text | tr '\t' '\n' > .harness/runs/cloudwatch.jsonlWhere the log lands
In CloudWatch Logs.
How it reaches the harness
You download it with the AWS CLI and your own credentials.
For Bedrock Agents, turn on tracing in InvokeAgent and record each orchestration step's model usage from the trace events.