Amazon Bedrock Guardrails is AWS's main tool for putting responsible AI rules into a generative AI application. You configure a guardrail once, with safeguards for harmful content, off-limits topics, banned words, personal data and factual accuracy, and it checks both what users send and what the model returns. The exam expects you to pick the right safeguard for a described need, and to know that guardrails can be tested safely and used outside a Bedrock model call.
What a Guardrail Does
A guardrail sits between your users and the model. It checks the user's prompt before the model sees it, and checks the model's response before the user sees it. When something breaks a rule, the guardrail can stop it and return a message you wrote, such as "Sorry, I can't help with that." Because the guardrail is separate from the model, the same rules work the same way whichever foundation model you choose.
The Six Safeguards
| Safeguard | What it catches | Typical use |
|---|---|---|
| Content filters | Harmful categories: hate, insults, sexual content, violence, misconduct, and prompt attacks, each with an adjustable strength | Keep a public chatbot free of toxic text |
| Denied topics | Subjects you define in plain language, with optional example phrases | A bank's assistant refusing to give investment advice |
| Word filters | Exact words or phrases you list, plus a ready-made profanity list | Blocking competitor names or slurs |
| Sensitive information filters | Personal data such as names, emails and card numbers, plus your own patterns | Removing customer details from call summaries |
| Contextual grounding checks | Answers not supported by the source text, or not relevant to the question | Catching hallucinations in a RAG app |
| Automated Reasoning checks | Statements that break a set of logical rules built from your policy documents | Verifying eligibility answers against an HR policy |
Denied topics work on meaning, so they catch paraphrases. Word filters only match the exact words you list. AWS advises against using a denied topic to catch a single name or word.
Inputs, Outputs and Actions
Each safeguard can be turned on separately for prompts and for responses, with its own action:
- Block stops the content and returns your message.
- Mask replaces sensitive information with a placeholder such as {NAME} or {EMAIL}, so the rest of the text still flows. Only sensitive information filters can mask.
- Detect takes no action but reports what the guardrail found. This detect mode lets a team see what a guardrail would catch on real traffic, and tune it, before turning blocking on.
Automated Reasoning checks always work in detect mode. They return findings and suggested corrections rather than blocking.
Using a Guardrail
You build a guardrail as a working draft, try it in the console's test window, then save a numbered version. An application then names the guardrail and version when it calls a model through Bedrock. The ApplyGuardrail API runs the same checks on any text without calling a model at all, so you can check a user's question before a RAG search, or check output from a model hosted somewhere else.
On the Exam
Read the need and match the safeguard. A forbidden subject points to denied topics. A specific list of words points to word filters. Personal data that must disappear but leave the rest usable points to masking with a sensitive information filter. Answers that stray from the retrieved documents point to contextual grounding. Answers that must follow formal business rules, with an explanation, point to Automated Reasoning checks. A model outside Bedrock points to the ApplyGuardrail API.