Optional ReadonlycountAlarm when the number of guardrail interventions in one alarm period exceeds this
value. Counts every evaluation that intervened, on input or output, for inline use
(Converse, ConverseStream, InvokeModel with a guardrail) and ApplyGuardrail alike.
Omit to skip the count alarm.
Use cases: catching a burst of blocked content regardless of traffic volume
AWS: CloudWatch alarm on SUM(InvocationsIntervened)
Validation: Optional; Number; >= 0
Optional ReadonlyrateAlarm when the percentage of guardrail evaluations that intervened in one alarm period exceeds this value. An inline call is evaluated on its input and, if the input passes, again on its output, so the denominator is evaluations, not calls. Omit to skip the rate alarm.
In a period with few evaluations one intervention is a large share: one intervention
in a period with a single evaluation is 100%. On a low-traffic guardrail, require
several breaching periods with datapointsToAlarm, or use countThreshold instead.
Use cases: intervention-rate alerting that scales with traffic, detecting policy drift
AWS: CloudWatch alarm on AVG(InvocationsIntervened), the share of evaluations that intervened, with a threshold of ratePercentThreshold / 100
Validation: Optional; Number; percentage, at least 0 and below 100
Intervention alarms on one guardrail. Each threshold set creates one CloudWatch alarm on a Metrics Insights query that aggregates the guardrail's
InvocationsIntervenedmetric across every version of the guardrail,DRAFTincluded, so the alarm counts traffic whichever version a caller invokes. Notification target and timing come from the module-levelguardrailAlarmsblock.Use cases: detecting a spike in blocked prompts or responses, prompt-attack bursts, policy-violation trend alerting
AWS: CloudWatch alarm on a Metrics Insights query over AWS/Bedrock/Guardrails InvocationsIntervened
Validation: at least one of countThreshold or ratePercentThreshold; requires the module-level guardrailAlarms block