Filtering Offensive Content in Amazon Bedrock Using Guardrails
A company uses Amazon Bedrock to generate product descriptions. They need to ensure outputs do not contain offensive language. Which service should they integrate to filter content?
Quick Answer
The answer is Amazon Bedrock Guardrails, the correct choice because it is the native AWS service designed specifically to enforce content policies for foundation model outputs, including offensive content filtering with Bedrock Guardrails. This service allows you to apply customizable safety filters, deny topics, and block harmful language like hate speech or profanity directly within your Bedrock workflows, without needing additional services or custom code. On the AWS Certified AI Practitioner AIF-C01 exam, this question tests your understanding of built-in safety mechanisms versus external solutions—a common trap is confusing Guardrails with services like Amazon Comprehend or Lambda-based filters, but Guardrails is the integrated, zero-code option for content moderation. Remember the memory tip: “Guardrails guard the gates”—if the task is filtering outputs at the model level, Bedrock Guardrails is the direct, exam-approved answer.
⚠ Common exam trap
A common mix-up: candidates confuse Amazon Comprehend's text analysis capabilities (like sentiment detection) with real-time content filtering, but Comprehend lacks the policy enforcement and integration with Bedrock that Guardrails provides.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Bedrock Guardrails
Amazon Bedrock Guardrails is the correct choice because it is specifically designed to enforce content policies for foundation model outputs, including filtering for offensive language, hate speech, and other harmful content. It integrates directly with Bedrock to apply customizable safety filters and deny topics without requiring additional services or custom code.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Amazon Comprehend
Why it's wrong here
Comprehend can analyze sentiment but is not designed for real-time content filtering in Bedrock.
- ✗
Amazon Rekognition
Why it's wrong here
Amazon Rekognition analyses images and videos for objects, scenes, and faces, but lacks the natural language processing capability to scan text for offensive language, which is the requirement in this scenario. It is tempting because Rekognition includes content moderation for unsafe visual content, such as explicit imagery, making it a plausible choice for filtering inappropriate material in a different context—specifically, when moderating image or video assets rather than generated text.
- ✓
Bedrock Guardrails
Why this is correct
Guardrails offers configurable content filters for safety and compliance.
- ✗
AWS WAF
Why it's wrong here
WAF protects web applications from attacks, not content moderation.
Go deeper
Related to this question
About these practice questions
One of 619 original AIF-C01 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
Same concept, more angles
2 more ways this is tested on AIF-C01
These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.
Variation 1. A company is using Amazon Bedrock to generate images from text prompts. They need to ensure the generated images do not contain offensive content. Which feature should be enabled?
medium- A.VPC endpoints
- B.AWS WAF
- ✓ C.Content moderation with AI
- D.IAM policies
Why C: Amazon Bedrock's content moderation with AI feature allows you to filter generated images for offensive or inappropriate content by applying predefined or custom moderation policies. This is the correct choice because it directly addresses the requirement to ensure generated images do not contain offensive material, leveraging machine learning models to detect and block such content at inference time.
Variation 2. A company is using Amazon Bedrock to generate images. They want to ensure the outputs comply with content policies. Which TWO AWS services can help? (Choose two.)
medium- ✓ A.Amazon Augmented AI (A2I)
- ✓ B.Amazon Rekognition
- C.Amazon GuardDuty
- D.AWS WAF
- E.Amazon Comprehend
Why A: Amazon Augmented AI (A2I) is correct because it enables human review of model predictions to ensure compliance with content policies. For image generation on Bedrock, A2I can route outputs that fall below a confidence threshold to human reviewers, providing a safety net for policy adherence.
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This AIF-C01 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AIF-C01 exam.