---
title: CloudTrail should capture data events for Bedrock resources in use
description: Datadog, the leading service for cloud-scale monitoring.
breadcrumbs: >-
  Docs > Datadog Security > OOTB Rules > CloudTrail should capture data events
  for Bedrock resources in use
---

> For the complete documentation index, see [llms.txt](https://docs.datadoghq.com/llms.txt).

# CloudTrail should capture data events for Bedrock resources in use
 
## Description{% #description %}

Amazon Bedrock records agent invocations, knowledge base retrievals, flow invocations, guardrail evaluations, and prompt rendering as CloudTrail data events, which trails do not log by default. In each Region where an account has Bedrock agent aliases, knowledge bases, flow aliases, guardrails, or prompts, one actively logging trail that is multi-region or in that Region (an organization trail counts for every member account) should have an advanced event selector with `eventCategory` set to `Data` for each of those resource types. The matching `resources.type` values are `AWS::Bedrock::AgentAlias`, `AWS::Bedrock::KnowledgeBase`, `AWS::Bedrock::FlowAlias`, `AWS::Bedrock::Guardrail`, and `AWS::Bedrock::Prompt` (or `AWS::Bedrock::PromptVersion`, the name in the CloudTrail data-event table). As in the CIS audit, coverage split across several trails fails, and a selector that also narrows `resources.ARN`, `eventName`, or `readOnly` still counts, because CIS allows narrowing to control cost. Instead of the CIS step that asks for the account's own inventory, the rule uses the collected Bedrock resources, so accounts with none of these resources are skipped, and a resource with no ARN has no known Region and can only be covered by a multi-region trail. Inline agents (`AWS::Bedrock::InlineAgent`), bidirectional streaming (`AWS::Bedrock::Model`), and asynchronous invocations (`AWS::Bedrock::AsyncInvoke`) are not checked, because the collected inventory does not show whether the account uses them.

## Remediation{% #remediation %}

Add an advanced event selector for each Bedrock resource type in use to a multi-region trail, for example with `aws cloudtrail put-event-selectors`. For the selector values and examples, see [Monitor Amazon Bedrock API calls using CloudTrail](https://docs.aws.amazon.com/bedrock/latest/userguide/logging-using-cloudtrail.html) in the Amazon Bedrock User Guide.

## References{% #references %}

- [Monitor Amazon Bedrock API calls using CloudTrail](https://docs.aws.amazon.com/bedrock/latest/userguide/logging-using-cloudtrail.html)
- [CIS Amazon Web Services Benchmarks](https://www.cisecurity.org/benchmark/amazon_web_services)
