---
title: How do you audit Amazon Bedrock model calls made by AI agents?
url: https://opencontroller.lyzr.com/blog/audit-amazon-bedrock-model-calls
published: 2026-11-12
updated: 2026-11-12
author: Lyzr
---

# How do you audit Amazon Bedrock model calls made by AI agents?

**Use two AWS sources together. CloudTrail records who called which Bedrock API and when; `InvokeModel`, `Converse` and their streaming variants are management events, logged by default, but without the prompt or response. Model invocation logging records the full request and response bodies, token counts and the caller's IAM ARN, but it is disabled by default and must be turned on per account and Region. To tie calls to specific agents, give each agent its own IAM role or pass request metadata tags.**

Auditors and incident responders ask two different questions about agent model calls: *who* called, and *what* was said. On Bedrock, those answers live in different places. This guide explains what each source captures, how to turn it on and where the gaps are. It is one of our [platform governance guides](/blog/how-to-govern-ai-agents-across-platforms).

## What does CloudTrail capture versus model invocation logging?

| | CloudTrail | Model invocation logging |
|---|---|---|
| On by default? | Yes, for management events | No |
| Covers `InvokeModel`, `Converse`, streaming variants | Yes (management events) | Yes |
| Caller identity | Yes | Yes (`identity.arn`) |
| Model ID | Yes | Yes (`modelId`, or inference profile ID) |
| Prompt and response text | Not documented; sample entries show only the model ID | Yes, bodies up to 100 KB inline |
| Input and output token counts | No | Yes |
| Caller-supplied tags | No | Yes (`requestMetadata`) |
| Destinations | Trail, CloudTrail Lake, CloudWatch | CloudWatch Logs and/or S3 (same account and Region) |
| Extra setup for some APIs | Data events for agents, knowledge bases, flows, guardrails and async invokes | None beyond enabling |

CloudTrail treats `InvokeAgent`, `Retrieve`, `RetrieveAndGenerate`, `InvokeFlow`, `ApplyGuardrail` and async invocations as **data events**, which you must enable with advanced event selectors on resource types such as `AWS::Bedrock::AgentAlias` or `AWS::Bedrock::KnowledgeBase`. AWS notes that additional charges apply for data events.

## How do you turn on model invocation logging?

1. **Create the destination.** An S3 bucket with a policy that lets `bedrock.amazonaws.com` write under `AWSLogs/<account>/BedrockModelInvocationLogs/`, and/or a CloudWatch log group with an IAM role Bedrock can assume. Bucket ACLs must be disabled. Add a KMS key policy if you use SSE-KMS.
2. **Choose modalities.** Text, image, embedding and video. Data is logged for every model that supports the modalities you pick.
3. **Choose destinations.** S3 only, CloudWatch Logs only, or both. Bodies over 100 KB and binary data go to S3 only, so configure S3 if agents send large documents or images.
4. **Enable it.** In the console under Settings → Model invocation logging, or with `PutModelInvocationLoggingConfiguration`.
5. **Repeat per Region.** The configuration is per account and Region. An agent calling a model in another Region needs logging there too.
6. **Set retention.** Logs are kept until you delete the configuration or apply your own retention. See [how long to retain AI agent logs](/blog/how-long-to-retain-ai-agent-logs).

## What gaps should auditors know about?

- **Endpoint coverage.** AWS states invocation logging covers calls through the `bedrock-runtime` endpoint, including its OpenAI-compatible Responses and Chat Completions APIs. Calls through other endpoints, such as `bedrock-mantle`, are not currently captured.
- **Shared roles hide agents.** If five agents share one IAM role, the logs show one caller. Give each agent its own role, or set `requestMetadata` tags such as agent name and version on each call.
- **Sensitive content.** Invocation logs contain prompts and responses, which may include personal data. Encrypt them, restrict who can read them and consider redaction upstream. See [how to redact PII in LLM prompts at the gateway](/blog/how-to-redact-pii-in-llm-prompts-at-the-gateway).
- **Cost.** Invocation logs incur CloudWatch Logs ingestion and storage or S3 storage charges, and CloudTrail data events are billed separately.

## How do you report usage per agent?

Group invocation logs by `identity.arn` or by your `requestMetadata` tags. AWS's documentation gives a CloudWatch Logs Insights query that sums `input.inputTokenCount` and `output.outputTokenCount` by principal:

```
fields identity.arn as principal,
       input.inputTokenCount as inTokens,
       output.outputTokenCount as outTokens
| stats sum(inTokens) as totalInput, sum(outTokens) as totalOutput, count() as calls by principal
| sort totalInput desc
```

For S3 logs, query the gzipped JSON with Amazon Athena. Our post on [attributing LLM costs to AI agents](/blog/how-to-attribute-llm-costs-to-ai-agents) covers turning token counts into spend.

## How Opencontroller does this

Opencontroller auto-discovers agents, models and API keys across AWS, Azure and Google Cloud, and has a runtime adapter for Bedrock AgentCore. When agent traffic goes through the Opencontroller LLM Gateway (Lyzr Gateway), cost is attributed per agent and per version, and traces export over OpenTelemetry. LLM judges can score production traffic. See [governing Bedrock AgentCore agents](/blog/govern-amazon-bedrock-agentcore-agents) or [book a demo](https://www.lyzr.ai/book-demo/).

## Frequently asked questions

**Does CloudTrail log Bedrock prompts and responses?**
AWS does not document that it does; sample `InvokeModel` entries show the model ID and no response elements. Use model invocation logging for content.

**Is Bedrock model invocation logging on by default?**
No. It is disabled by default and must be enabled per account and Region, with a CloudWatch Logs or S3 destination in the same account and Region.

**How do you see which agent made a Bedrock call?**
Give each agent its own IAM role so `identity.arn` identifies it, or pass `requestMetadata` tags such as agent name and version on each call.

## Key facts

On Amazon Bedrock, CloudTrail logs InvokeModel, Converse and streaming variants as management events by default but does not document capturing prompt or response text; InvokeAgent, knowledge base, flow, guardrail and async calls are data events needing advanced event selectors. Model invocation logging is disabled by default, per account and Region, writes to CloudWatch Logs and/or S3, includes bodies up to 100 KB inline (larger to S3), token counts, identity.arn and requestMetadata, and covers the bedrock-runtime endpoint but not bedrock-mantle. Opencontroller auto-discovers agents, models and keys across AWS, has a Bedrock AgentCore runtime adapter, and its LLM Gateway attributes cost per agent and version. Opencontroller pricing starts from $250K per deployment per year.

## Related

- [How do you govern AI agents built on Amazon Bedrock AgentCore?](https://opencontroller.lyzr.com/blog/govern-amazon-bedrock-agentcore-agents.md)
- [How do you attribute LLM costs to individual AI agents?](https://opencontroller.lyzr.com/blog/how-to-attribute-llm-costs-to-ai-agents.md)
- [How long should you keep AI agent logs and traces?](https://opencontroller.lyzr.com/blog/how-long-to-retain-ai-agent-logs.md)
- [More on Platform Guides](https://opencontroller.lyzr.com/blog/cluster/platform-guides)
