AWS Bedrock - is there a "native" Model usage log? Without the need to have CloudWatch, S3 or other ...

0

Hi, I am migrating from Anthropic "direct" API do AWS Anthropic API.

On Antrophic we have a simple usage log with the time, model, model latency, input tokens, output tokens and type (API or console). I dont need the prompt and text input and output as we capture that on the application already. Example of the report below: Enter image description here

I am new to AWS and trying to find that. Is there something simple like this?

I see that for a more robust log I would need to install CloudWatch, S3 or other repository but I am trying to keep it simple.

Thanks in advance,

Leo

已提问 1 个月前343 查看次数
2 回答
2

Hi THere

There isnt a native dashboard, but you can turn on Bedrock Invocation Logs and log the data to CloudWatch Logs. You can then use a CloudWatch Logs query like:

fields @timestamp, input.inputTokenCount, output.outputTokenCount, modelId, operation

And then create a dashboard to get the data you are looking for.

Enter image description here

You can also use CloudWatch Metrics to build a dashboard to see overall statistics over time like average invocation time, total token counts, etc.

Enter image description here

profile pictureAWS
专家
Matt-B
已回答 1 个月前
profile picture
专家
已审核 1 个月前
profile pictureAWS
专家
已审核 1 个月前
  • Great detailed answer! Thanks!

  • Yes, that what I personally do: use the metrics generated in CloudWatch by Bedrock to create nice and efficient CloudWatch dashboards. So, it brings observability to Bedrock.

1
已接受的回答

You would have to use CloudWatch and S3 for logging.

profile pictureAWS
专家
已回答 1 个月前
profile picture
专家
已审核 1 个月前
profile picture
专家
已审核 1 个月前
profile pictureAWS
专家
已审核 1 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则