User-generated content needs a check before it reaches other users, and reviewing every upload by hand does not scale. Rekognition's moderation operations give you an automated first pass over images and video, flagging categories of unsafe or inappropriate content with confidence scores.
The pattern splits the same way the rest of Rekognition does: images are synchronous, video is an asynchronous job. This page covers both, plus how to turn the output into a review workflow instead of a blunt auto-reject.
Moderation labels are hierarchical: a broad category (ParentName, such as "Explicit Nudity" or "Violence") contains more specific labels (Name, such as a particular type within that category). Filtering or alerting on the parent category catches everything beneath it without enumerating every specific label.
A video can run for hours, so there is no synchronous "moderate this video" call - moderation, like every other video operation, follows the start/poll pattern. StartContentModeration requires the video to already be in S3 (not sent as bytes) and takes an optional NotificationChannel (an SNS topic plus an IAM role Rekognition assumes to publish to it) so you can react to completion by event instead of polling in a loop.
The most reliable pattern uses three bands based on confidence: below a low bar, auto-approve; above a high bar, auto-reject or block; in between, route to human review. Where those bars sit is a product and legal decision, not a technical default - treat MinConfidence as the first filter, not the whole policy. Log every decision, including auto-approvals, so you can audit false negatives later.
DetectModerationLabels is purpose-built for safety categories; it will not tell you the image also contains a "Dog" or a "Beach". If you need both moderation and general tagging, call DetectLabels alongside it - they are separate operations with separate pricing, run on the same image.
Treating an empty ModerationLabels list as "safe." It only means nothing crossed MinConfidence - it is not a certified-safe guarantee. Fix: pick a MinConfidence deliberately and pair automated results with spot-check review.
Sending video bytes directly to StartContentModeration. Video operations only accept a Video.S3Object reference, never raw bytes. Fix: upload the video to S3 first.
Forgetting the NotificationChannel's IAM role. The role Rekognition assumes to publish to your SNS topic needs a trust policy allowing the Rekognition service principal. Fix: set up the role once per account before wiring notifications.
Polling GetContentModeration in a tight loop. It works but wastes calls and adds latency versus reacting to the SNS notification. Fix: use NotificationChannel and trigger your poll (or final read) from the event instead.
Auto-rejecting on any non-empty ModerationLabels. A single low-confidence label near the parent category boundary can cause over-blocking. Fix: use a review band around your threshold instead of a hard cutoff.
Assuming moderation covers text content in the image. Moderation labels are about visual content categories, not any embedded text. Fix: pair with DetectText and your own text-moderation logic if written content matters too.
Does an empty ModerationLabels response mean the image is safe?
It means nothing crossed your MinConfidence threshold, not that the content is certified safe. Treat it as one signal in a broader moderation policy.
Why can't I moderate a video with a single synchronous call?
Video can run for hours, so every video operation, including moderation, uses the async start/poll pattern - StartContentModeration plus GetContentModeration, the same as label and face detection on video.
What does the ParentName field tell me?
It is the broader safety category a specific label belongs to, letting you alert or filter at the category level without enumerating every specific label underneath it.
Should I auto-reject anything Rekognition flags?
Generally no. Use confidence bands - auto-approve below a low threshold, auto-reject above a high one, and route the middle to human review - rather than a single hard cutoff.
Do I need an SNS topic for image moderation too?
No, NotificationChannel only applies to the async video operations. Synchronous image moderation returns results directly in the response.
Can I moderate video without polling in a loop?
Yes, configure NotificationChannel on StartContentModeration so Rekognition publishes to your SNS topic on completion, then read the final result with GetContentModeration when notified.
What timestamps come back for video moderation?
Each flagged label includes a Timestamp in milliseconds from the start of the video, letting you jump directly to the flagged segment instead of reviewing the whole file.
Can DetectModerationLabels also tag general content like objects?
No, it only returns safety-category labels. Call DetectLabels separately on the same image if you also want general object and scene tags.