from logs-aws_bedrock.invocation-*
// create time window buckets of 1 minute
| eval time_window = date_trunc(1 minute, @timestamp)
| where gen_ai.guardrail_id is NULL
| KEEP @timestamp, time_window, gen_ai.guardrail_id , user.id
| stats model_invocation_without_guardrails = count() by user.id
| where model_invocation_without_guardrails > 5
| sort model_invocation_without_guardrails desc
Install detection rules in Elastic Security
Detect AWS Bedrock Invocations without Guardrails Detected by a Single User Over a Session in the Elastic Security detection engine by installing this rule into your Elastic Stack.
To setup this rule, check out the installation guide for Prebuilt Security Detection Rules(opens in a new tab or window).