Amazon Bedrock Guardrails
Configurable safety filters for prompts and model responses.
❓ What is it?
A policy layer for Bedrock applications that filters harmful content, blocks denied topics, redacts PII, filters profanity, and can detect hallucinated answers via contextual grounding checks.
💡 Why does it exist?
Foundation models are general-purpose; your application is not. A bank chatbot must refuse investment advice, a kids app must block adult content. Guardrails encode those product rules once and enforce them on every input and output, independent of which model you use.
⏱️ When should you use it?
Use it whenever a generative application faces users — especially regulated industries, brand-sensitive assistants, or anything handling personal data. Apply it even with well-behaved models: it is your policy, not the model's.
🗺️ Where does it fit?
It wraps the model invocation inside Bedrock — evaluating the user prompt before the model sees it and the response before the user sees it. One guardrail can be reused across models, Agents, and Knowledge Bases.
🔌 How do you integrate it?
Define a guardrail in the console or API: denied topics (natural-language definitions), content filter strengths per category, PII redaction rules, word filters, and grounding thresholds. Attach its ID to InvokeModel/Converse calls or to an Agent.
🧩 Commonly integrated with
🎯 Exam angle (AIF-C01)
- Guardrails work on BOTH input and output, and can block or mask (redact) PII rather than just refuse.
- Contextual grounding checks flag responses unsupported by the retrieved source — the exam's go-to answer for reducing hallucinations in RAG.