Build a serverless PII redaction pipeline with Amazon Bedrock Data Automation
aws ·
This article demonstrates how to build a serverless pipeline for automated Personally Identifiable Information (PII) redaction using Amazon Bedrock Data Automation, AWS Step Functions, and AWS Lambda. The solution addresses the limitations of manual redaction and traditional OCR by leveraging generative AI to interpret document context and layout holistically. A custom blueprint allows users to define specific fields to redact using natural language instructions, distinguishing between sensitive patient data and non-sensitive physician information. The architecture processes documents in batches, converting PDFs to images and applying black box redaction based on bounding box coordinates returned by the service. To improve accuracy, the pipeline employs a dual-pass detection method that combines custom blueprint extraction with standard word-level output token matching. Evaluation results showed that this approach achieved 97.0% precision and increased recall from 89.3% to 95.2% across various document quality levels, including handwritten forms and low-resolution scans. The serverless design ensures scalability and cost-efficiency while maintaining security through IAM roles, encryption, and VPC networking. This reusable pattern can be adapted for healthcare, financial, and government sectors to handle high-volume PII compliance requirements.
aws