How to redact PII with Amazon Comprehend
DetectPiiEntities returns entities with type and confidence for a text; ContainsPiiEntities returns only labels. Input is UTF-8 text up to 100 KB. For redaction, start an async StartPiiEntitiesDetectionJob with files in S3; masking uses a mask character or replacement with the entity type. Detected types include name, address, email, phone, IBAN, SWIFT code, date and IP address. Comprehend is available in European regions such as Frankfurt (eu-central-1).