---
title: "Deploying a Cost-Effective, Scalable PhotoDNA System for CSAM Detection"
description: "Scribd built a known-CSAM detection pipeline that separates event-driven PhotoDNA hash generation on AWS Lambda (including images extracted from PDFs) from a GPU-backed batch matcher on SageMaker that compares hashes against versioned NCMEC hash sets with conservative distance thresholds."
url: "https://swe.quest/articles/deploying-a-cost-effective-scalable-photodna-system-for-csam-detection-e4c3c230fe188366"
canonical: "https://tech.scribd.com/blog/2026/photodna-csam-detection.html"
source: "Scribd Tech"
published: "2026-01-20"
difficulty: "easy"
kind: "Case study"
reading_minutes: 6
tags: ["threat-detection","system-design","cloud","cost-optimization","privacy"]
---

# Deploying a Cost-Effective, Scalable PhotoDNA System for CSAM Detection

A post on [Scribd Tech](https://swe.quest/sources/scribd.md), published 2026-01-20, 6 min read, Case study. Original: [https://tech.scribd.com/blog/2026/photodna-csam-detection.html](https://tech.scribd.com/blog/2026/photodna-csam-detection.html)

## Summary

Scribd built a known-CSAM detection pipeline that separates event-driven PhotoDNA hash generation on AWS Lambda (including images extracted from PDFs) from a GPU-backed batch matcher on SageMaker that compares hashes against versioned NCMEC hash sets with conservative distance thresholds. Matches trigger quarantine, evidence preservation, human review and NCMEC CyberTipline reporting, with hash-set and threshold versions recorded for auditability. GPU batch execution delivered better throughput and cost per unit of work than equivalent CPU fleets. SQS buffering, storage lifecycle tiering and strict IAM boundaries kept costs down and limited sensitive data exposure, though operational details are deliberately withheld.

Written by swe.quest, not by the author.

**Difficulty:** Easy: no special background needed; explains what something is and why it matters

## Topics

- [Threat detection](https://swe.quest/tags/threat-detection.md) (Security)
- [System design](https://swe.quest/tags/system-design.md) (Architecture & design)
- [Cloud platforms](https://swe.quest/tags/cloud.md) (Infrastructure)
- [Cost optimization](https://swe.quest/tags/cost-optimization.md) (Reliability & operations)
- [Privacy](https://swe.quest/tags/privacy.md) (Security)

## Prerequisites

- AWS Lambda and SQS ([easy posts on Cloud platforms](https://swe.quest/tags/cloud.md?difficulty=easy))
- batch processing pipelines
- perceptual hashing basics

## Keywords

PhotoDNA, NCMEC, AWS SageMaker, AWS Lambda, Amazon SQS, Project Lantern, Weights & Biases, Tech Coalition

## Related posts

- [From single pull requests to full software packages: Detecting malicious code at scale](https://swe.quest/articles/from-single-pull-requests-to-full-software-packages-detecting-malicious-code-at-717a58a001a046a1.md): Datadog Engineering · 2026-06-02 · Medium · 12 min read · Supply chain security, Threat detection, AI agents, LLMs, Cost optimization
  Datadog extended BewAIre, its LLM-based malicious code detector, from pull requests to full dependency packages by stacking a cheap filter model in front of an agentic investigation model.
- [Cisco Talos empowers threat researchers while reducing TCO by 75% with ClickHouse Cloud](https://swe.quest/articles/cisco-talos-empowers-threat-researchers-while-reducing-tco-by-75-with-b07e23f1f37bf66e.md): ClickHouse · 2026-06-15 · Medium · 6 min read · Analytics & OLAP, Cloud platforms, Cost optimization, Data pipelines, Threat detection
  Cisco Talos moved its file-hash reputation service, nearly 2 trillion rows (192 TB compressed, ~2 PB raw) growing by 27 billion rows a day, from a self-managed ClickHouse cluster on EKS to ClickHouse Cloud with zero downtime.
- [Video Invisible Watermarking at Scale](https://swe.quest/articles/video-invisible-watermarking-at-scale-acb75c9e33b19572.md): Meta Engineering · 2025-11-04 · Medium · 8 min read · Video & media, Inference & serving, Performance engineering, Cost optimization, Privacy
  Meta runs ML-based invisible video watermarking (VideoSeal-style) as a custom FFmpeg filter for provenance use cases like detecting AI-generated video and identifying first uploaders.
- [Outgrowing Lambda Functions, Not Lambda | Honeycomb](https://swe.quest/articles/outgrowing-lambda-functions-not-lambda-honeycomb-70c5a0734377ce87.md): Honeycomb · 2026-11-25 · Medium · 20 min read · Serverless, Cost optimization, Cloud platforms, Capacity planning, Observability
  Honeycomb moved most of its S3-backed query mapper compute from Lambda Functions to AWS Lambda Managed Instances, eventually cutting query costs 40-56%, though the switchover itself was easy and the savings came from months of tuning.
- [How TUI scales threat modeling for 100+ teams with Amazon Bedrock](https://swe.quest/articles/how-tui-scales-threat-modeling-for-100-teams-with-amazon-bedrock-db3a065835eb26fa.md): AWS Architecture Blog · 2026-11-05 · Medium · 11 min read · AI agents, Security, LLMs, Cloud platforms, Serverless
  TUI automated STRIDE threat modeling for 100+ product teams with a LangGraph agent on Amazon Bedrock AgentCore using Claude Sonnet 4.5.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
