Open-source analytics dashboard for AWS Bedrock. Deploy to your own AWS account and get visibility into AI adoption, token usage, cost, and performance across your organization.
- Adoption — Which teams, apps, and models are active
- Usage — Token consumption breakdown by model, team, and app
- Cost — Spend analysis with automatic per-model pricing
- Performance — Latency percentiles, error rates, throughput
Dashrock runs entirely in your AWS account. No data leaves your infrastructure.
- AWS account with credentials configured (
aws sts get-caller-identityshould work) - Bedrock model invocation logging enabled to CloudWatch Logs (how to enable)
- Node.js 20+
git clone https://github.com/maratgaliev/dashrock.git
cd dashrock
npm install
AWS_PROFILE=your-profile npm run deployReplace your-profile with your AWS CLI profile name. If you use default credentials, you can omit AWS_PROFILE:
npm run deployThis deploys to the production stage by default. When it finishes, you'll see:
✓ Complete
url: https://d1abc2def3.cloudfront.net
bucket: dashrock-production-dashrockdata-abc123
Open the URL — that's your dashboard. The collector runs every hour and pulls data from CloudWatch Logs automatically.
Go to Amazon Bedrock > Settings > Model invocation logging in the AWS Console:
- Enable CloudWatch Logs
- Set the log group name (default:
bedrock-logs) - Select a service role (create one if prompted)
- Save
Any Bedrock API call made after this will be logged and picked up by the collector.
For deploying, the IAM user or role running npm run deploy needs broad permissions (CloudFormation, Lambda, S3, IAM, CloudFront, EventBridge, etc.). See iam-policy.json for the full policy.
At runtime, SST automatically creates scoped roles for the Lambda functions. The collector only needs CloudWatch Logs read access and S3 read/write to its own bucket. See iam-policy-runtime.json for reference.
AWS SSO users:
aws sso login --profile my-profile
AWS_PROFILE=my-profile npm run deployAfter deploy, trigger the collector manually to pull any existing logs:
aws lambda invoke \
--function-name $(aws lambda list-functions --query "Functions[?contains(FunctionName, 'CollectorSchedule')].FunctionName" --output text) \
/tmp/dashrock-out.json && cat /tmp/dashrock-out.jsonYou should see "Processed N new events". Refresh the dashboard to see data.
Map IAM principals (user ARNs, role ARNs) to human-readable team and app names:
cp dashrock.config.example.yaml dashrock.config.yamlEdit dashrock.config.yaml:
teams:
engineering:
- arn:aws:iam::123456789012:role/engineering-role
- arn:aws:iam::123456789012:user/alice
data-science:
- arn:aws:iam::123456789012:role/ds-role
apps:
my-chatbot:
- arn:aws:iam::123456789012:role/chatbot-role
internal-tools:
- arn:aws:iam::123456789012:role/tools-roleUpload it to the S3 bucket:
npm run upload-configThe collector reads this config from S3 on every run. Update and re-upload anytime — no redeploy needed. Unmapped ARNs appear as their IAM username.
Default model pricing is built-in for Claude, Titan, and other common models. Override or add models in the pricing section of the config.
CloudWatch Logs (Bedrock invocation logs)
|
EventBridge (hourly)
|
Lambda collector --> S3 bucket (raw + daily/monthly aggregates)
|
Next.js dashboard (CloudFront + Lambda)
All resources are serverless. Monthly cost is near zero for typical usage.
| Variable | Default | Description |
|---|---|---|
AWS_PROFILE |
(default) | AWS CLI profile to use for deployment |
DASHROCK_LOG_GROUP |
bedrock-logs |
CloudWatch Logs group where Bedrock logs are written |
AWS_REGION |
us-east-2 |
Region where Bedrock logging is configured |
DASHROCK_DOMAIN |
(none) | Optional custom domain (e.g. analytics.example.com) |
DASHROCK_ZONE_ID |
(auto) | Route 53 hosted zone ID, only needed if auto-detection fails |
Example with custom region and log group:
AWS_REGION=us-west-2 DASHROCK_LOG_GROUP=my-bedrock-logs AWS_PROFILE=my-profile npm run deployProtect the dashboard with basic auth via SST secrets. Auth is enabled when both secrets are set:
npx sst secret set DashrockUser my-username --stage production
npx sst secret set DashrockPass my-password --stage production
npm run deployTo disable auth, remove the secrets and redeploy.
npm run devRuns Next.js on localhost:3000. Without a DATA_BUCKET env var, the dashboard shows an empty state. To develop against real data, set DATA_BUCKET to your S3 bucket name and ensure AWS credentials are configured.
- Next.js — Dashboard UI
- SST — Infrastructure as code
- Chart.js — Visualizations
- daub.dev — UI components
- AWS Lambda, S3, CloudFront, EventBridge
MIT