Amazon iconAmazonSep 16, 2026 ~7 min source read

Serverless PII redaction at scale with Amazon Bedrock Data Automation

A practical walkthrough of a serverless pipeline that detects and redacts personally identifiable information (PII) from scanned documents using a custom Amazon Bedrock Data Automation blueprint, AWS Step Functions, and AWS Lambda.

Build a serverless PII redaction pipeline with Amazon Bedrock Data Automation

Share this story

Send the public story page.

Useful takeaways from this story.

Use a custom Bedrock Data Automation (BDA) blueprint to declare the exact fields to extract and redact with field-level precision.

A serverless batch pipeline (BDA + Step Functions + Lambda) scales document processing without maintaining servers.

Design the blueprint by answering four scoping questions: what to redact, what not to redact, where on the page, and how to remove it.

# Why this matters Organizations that process thousands of scanned documents daily—medical forms, insurance claims, financial records—need reliable, scalable PII redaction before sharing or downstream processing. Manual redaction doesn't scale and traditional OCR-plus-pattern-matching approaches struggle with degraded text, handwriting, and field-level business rules.

# Solution in brief

# How the PII blueprint is designed Start by answering four concrete questions for the target document type:

  • What is sensitive? (e.g., patient name, date of birth, home address, contact info)
  • What is not sensitive? (e.g., physician name, office contact, medical notes)
  • Where does it appear? (structured fields, handwriting, repeated instances)
  • How should it be removed? (bounding box coords, convert PDF to PNG, black-box overlay)

Use the BDA console, CLI, or SDKs to create a blueprint schema that enumerates each field eligible for redaction. For each field include the data type, a short natural-language description, and any transformations (for example, date formats). Use explicit instructions to scope subtypes—e.g., instruct BDA to extract patient date of birth while ignoring appointment or signature dates. That scoping keeps non-sensitive dates and names out of the redaction set.

# Serverless architecture The pipeline is serverless and batch-oriented so it scales without server management. Core components:

  • AWS Step Functions: orchestrates the batch workflow, handling retries, parallelism, and orchestration logic.
  • AWS Lambda: handles lightweight transformations and post-processing such as image conversion, applying black-box redaction at bounding boxes, and token-matching checks.

This separation lets the same pipeline serve multiple use cases by swapping blueprints and post-processing rules.

# Improving recall for degraded or handwritten text Generative-document-understanding can still miss low-quality or handwritten tokens. The solution includes a token-matching quality check: after BDA returns extracted tokens and bounding boxes, compare tokens against expected patterns or token lists and use a tolerant match to capture missed instances. When token matching finds additional candidates, include them in redaction or flag for human review. This raises recall for degraded inputs without retraining models.

# Practical considerations

  • Use the console walkthrough or sample documents to bootstrap the blueprint schema.
  • Keep instructions focused on the intended field owner (for example, patient vs. physician) to reduce false positives.
  • Apply coordinate-based black-box redaction to the image exports (PNG) rather than attempting in-place PDF edits.
  • Design the Step Functions workflow to surface low-confidence or ambiguous extractions for human review.

# Outcome The approach automates end-to-end PII detection and redaction at scale, enforces field-level business rules through natural-language blueprint instructions, and uses a token-matching quality check to improve recall on degraded or handwritten documents.

More context around this story.

How Boomi Scribe streamlines documentation using AWS
Amazon iconAmazonSep 1, 2026

How Boomi Scribe streamlines documentation using AWS

Boomi Scribe is an AI-powered agent on AWS that automatically generates documentation for enterprise integration workflows. Learn how Boomi uses Amazon Bedrock, Amazon SageMaker AI, Amazon S3, Amazon DynamoDB, and AWS Lambda to parse integration DAGs, generate detailed documentation, and compare component versions at s

Loading more related stories...

Keep reading in the app

Open the app view to save this story, compare related coverage, and continue from the same source.

Open in app