Ensure that every Amazon Bedrock agent has a guardrail associated and that the referenced guardrail still exists and has not been deleted. This rule extends the base check performed by the companion rule (which verifies only that an agent has a non-null guardrail identifier configured) by also cross-validating that the associated guardrail is still a live, existing resource. An agent can have a `guardrailIdentifier` value configured yet still be unprotected if the guardrail behind that identifier has since been deleted.
An identity or automation with the bedrock:DeleteGuardrail permission can delete a guardrail (and all of its versions) independently of any agent configuration. Because the agent record itself is not automatically updated when its associated guardrail is deleted, the agent continues to reference a guardrail ID that no longer exists. In this state, the agent silently loses all content filtering, prompt injection protection, and PII redaction, while still appearing "protected" to a check that only inspects the agent's configuration. Closing this gap requires an additional call to the Bedrock GetGuardrail operation using the guardrail identifier referenced by the agent — a ResourceNotFoundException response means the guardrail has been deleted and the agent must be treated as unprotected, even though its guardrailIdentifier field is still populated.
Audit
To determine whether your Amazon Bedrock agents reference guardrails that still exist, perform the following operations:
Remediation / Resolution
To ensure that your Amazon Bedrock agents are protected by guardrails that exist and are active, perform the following operations:
References
- AWS Documentation
- Detect and filter harmful content by using Amazon Bedrock Guardrails - Amazon Bedrock
- Create and configure agent manually - Amazon Bedrock
- GetAgent - Amazon Bedrock
- DeleteGuardrail - Amazon Bedrock
- GetGuardrail - Amazon Bedrock
- Implement safeguards for your application by associating a guardrail with your agent - Amazon Bedrock
- AWS Command Line Interface (CLI) Documentation
- list-agents
- get-agent
- update-agent
- get-guardrail
- create-guardrail