Skip to content

Moderation Filter

goldy4719 edited this page Apr 10, 2026 · 2 revisions

Overview:

The system evaluates uploaded images for unsafe content using Rekognition moderation labels and enforces a blocking policy when necessary.

Prerequisites:

  • Existing Lambda pipeline
  • Moderation permissions
  • Defined payload contract with moderation fields
  • Agreement on the moderation policy behavior

Implementation/Steps:

  1. The system invokes detect_moderation_labels alongside label detection.
  2. The system normalizes moderation labels and sorts them by confidence.
  3. The system sets a flagged state when moderation thresholds are met.
  4. The system blocks flagged images by returning a structured response.
  5. The system excludes normal tags when content is flagged.

Key Takeaways

  • Moderation runs by default with optional configuration.
  • Flagging follows a single consistent rule.
  • Unsafe content is blocked at the pipeline level.
  • Moderation output remains separate from normal tags.

Clone this wiki locally