AWS Certified Machine Learning – SpecialtyData EngineeringMedium

A data scientist is preparing a dataset for a natural language processing (NLP) model. The dataset consists of millions of customer reviews, and a significant portion contains personally identifiable information (PII) such as names, email addresses, and phone numbers. Before training the model, this PII must be removed or masked to comply with privacy regulations. Which AWS service is explicitly designed to detect and redact sensitive data from text at scale?

  1. AAmazon Macie
  2. BAmazon Textract
  3. CAmazon Rekognition
  4. DAmazon Comprehend
Show answer & explanation

Correct answer: D. Amazon Comprehend

Amazon Comprehend is a natural language processing (NLP) service that can identify PII in text and redact it. Its 'DetectPiiEntities' and 'Comprehend Medical' operations are specifically designed for this purpose, making it suitable for redacting sensitive information from customer reviews at scale.

Why the other options are wrong

  • A. Amazon Macie is a data security and privacy service that discovers and protects sensitive data in S3, but it focuses on identifying data at rest rather than actively redacting PII from streaming text for ML preprocessing.
  • B. Amazon Textract is for extracting text and data from scanned documents, not primarily for PII detection and redaction in free-form text.
  • C. Amazon Rekognition is for image and video analysis, not for processing text data.

Amazon Comprehend for PII Redaction

An AWS NLP service that uses machine learning to find insights and relationships in text, including identifying and redacting sensitive personally identifiable information (PII).

  • Detects PII entities like names, addresses, credit card numbers.
  • Can redact or mask identified PII.
  • Scalable for large volumes of text data.
  • Useful for privacy compliance in NLP datasets.

Memory trick: Comprehend the PII, then redact with ease!

More Data Engineering questions