AWS automates PII redaction in images with Nova 2 Lite and SAM 3
Amazon Web Services has published a six-step pipeline for automatically removing personally identifiable information (PII) from images, combining Amazon Nova 2 Lite, Meta SAM 3, and Amazon Textract. The solution targets regulatory compliance with GDPR and PCI DSS without the need to train custom models.
This article was generated using artificial intelligence from primary sources.
Photographs are one of the most challenging domains for automated privacy protection: a face may be partially concealed, an ID card rotated at an arbitrary angle, and a fingerprint barely visible at the edge of the frame. Previous tools specialized for a single detection type — OCR without computer vision, or computer vision without OCR — regularly fail on exactly these edge cases. Amazon Web Services is publishing a six-step pipeline that combines Amazon Nova 2 Lite, Meta SAM 3, and Amazon Textract to automatically redact personally identifiable information (PII) from images at scale, without the need to train custom models.
How does the pipeline work?
The entire data flow is orchestrated by AWS Step Functions, triggered by S3 event notifications:
Step 1 — Upload and trigger: The image is stored in Amazon S3. An EventBridge rule automatically activates the Step Functions workflow without manual initiation or polling logic.
Step 2 — Validation and initial screening: Nova 2 Lite checks the file format and assesses the presence of PII. Images with no visible PII exit the pipeline immediately — without triggering expensive downstream services. This early filtering directly reduces processing costs at scale.
Step 3 — Parallel visual detection: SAM 3 (Meta’s Segment Anything Model 3), deployed on Amazon SageMaker AI, generates pixel-level segmentation masks for faces, license plates, and other visual biometric elements. SAM 3 runs in parallel with step 4 to minimize total processing time.
Step 4 — Parallel text detection: Amazon Textract extracts all text from the image along with the pixel coordinates of each block. Nova 2 Lite then contextually assesses which text fragments are sensitive — a person’s name in a legal document is treated differently from the same name on a branded shirt in the background.
Step 5 — Redaction and verification: An AWS Lambda function, using the Pillow library, merges the coordinates from SAM 3 and Textract and blurs or covers the identified regions. Nova 2 Lite performs a final quality check of the redacted result.
Step 6 — Output routing: Images that pass verification go to the noPII folder. Images around which uncertainty remains go to a quarantine for manual review — ensuring that automation supplements, rather than replaces, human oversight for borderline cases.
Edge cases that previously failed
Addressing edge cases is the central contribution of this approach. Systems that use only OCR do not see faces; systems that rely solely on computer vision do not read text on documents. Nova 2 Lite coordinates both channels and provides contextual assessment that individual tools cannot offer:
- Partial faces — SAM 3 segments a face even when only a profile angle is visible or it is partially obscured by an object
- Reflections — a face reflected in glass or a mirror is detected and redacted the same as a directly visible face
- ID documents in arbitrary orientations — Textract’s coordinate system functions regardless of the document’s rotation in the frame
- Wide-angle photographs with documents — small documents in the corner of the frame that standard OCR would ignore are included in detection
The textual PII the system recognizes includes: names, identification numbers (national ID equivalents), addresses, phone numbers, MAC addresses, and vehicle VIN numbers. Visual PII includes faces, fingerprints, and other biometric data.
Regulatory application and cost efficiency
The pipeline is designed for compliance with GDPR and the PCI DSS payment card data protection standard. Organizations processing thousands or millions of documents can implement this solution without training custom models — reducing both development cost and the regulatory risk tied to the provenance and auditability of custom models.
Nova 2 Lite acts as the intelligent coordinator throughout the pipeline: early filtering of images without PII means SAM 3 and Textract — the computationally most expensive segments — never process a photograph that does not require it. Contextual routing also reduces unnecessary downstream calls within the pipeline itself. With AWS pay-per-use billing, both optimizations translate directly into a lower bill for at-scale processing.
The solution is available immediately for deployment on Amazon Bedrock and SageMaker AI, with no special prerequisites beyond a standard AWS account with appropriate IAM permissions.
Frequently Asked Questions
- What categories of personal data does the system recognize and remove?
- Textual PII includes names, identification numbers, addresses, phone numbers, MAC addresses, and vehicle VIN numbers. Visual PII includes faces, fingerprints, and other biometric data — including partially visible or reflected faces and documents in arbitrary orientations.
- What happens to images the system is uncertain were properly redacted?
- Nova 2 Lite performs a final verification after Lambda redaction. Images that pass the check go to the noPII folder, while those around which uncertainty remains go to quarantine for manual review — ensuring human oversight on edge cases.
- Which regulatory standards does this pipeline help meet?
- The solution is designed for compliance with GDPR and the PCI DSS data protection standard. It is applicable at scale without training custom models, which reduces development cost and regulatory risk tied to model provenance.
Related news
Alberta scanned 466 million lines of code in 20 hours: government uses Claude for cybersecurity
PASE: Neurosymbolic System Cuts Cloud Failure Recovery Time by More Than 40 Percent
How PyTorch Generates Thousands of Tests from a Few Template Classes — A Guide to the Test Infrastructure