Skill 2.5.1

Implement content filtering and compliance controls for generative AI services (for example, by using Amazon Bedrock Guardrails).

Key Concepts

Amazon Bedrock Guardrails combine several policies: content filters for hate, insults, sexual content, violence, misconduct and prompt attacks with adjustable strengths; denied topics described in natural language; word filters for profanity and custom terms; sensitive information filters that block or mask PII and custom regular expressions; contextual grounding checks that detect answers not supported by the source or not relevant to the question; and automated reasoning checks that validate answers against formal rules. A guardrail is versioned and applied to InvokeModel and Converse calls, knowledge bases and agents, or to any text through the ApplyGuardrail API, including for models hosted outside Bedrock.

Enforcement must not depend on every developer remembering it. The bedrock:GuardrailIdentifier condition key in IAM policies or SCPs denies model invocations that do not specify the approved guardrail, and organisation-level Bedrock policies in AWS Organizations apply a guardrail to every model call in the targeted accounts. Guardrail interventions are logged, so compliance teams can monitor how often and why content was blocked.