PII detection identifies personally identifiable information (PII) within content, such as names, email addresses, financial identifiers, etc.
The connector automatically selects the most appropriate Amazon Comprehend processing method based on the size of the submitted content:
| Document Type | Behavior Description |
|---|---|
| Small Documents |
For smaller documents, the connector performs synchronous entity extraction and returns the results immediately. The operation for this type of documents is DetectPiiEntities. The DetectPiiEntities operation will be called if the supplied text file is smaller than a configurable limit, by default 5000 bytes. |
| Large Documents | For documents that exceed synchronous processing limits, the
connector uses Amazon Comprehend asynchronous processing. The StartPiiEntitiesDetectionJob and DescribePiiEntitiesDetectionJob are used if the input file is larger than the AsynchDetectPIIEntities limit, by default 5000 bytes. The input file will be divided into a set of smaller files of a certain configured size. When dividing the original file, the engine ensures that it only includes full words and will not split on a non whitespace character. During asynchronous processing, the source document is divided into manageable sections that are uploaded to Amazon S3. Then the asynchronous entity recognition job is started and the connector monitors the job status until processing completes or a timeout occurs. The results are downloaded and combined into a single result set and the temporary processing files are removed. This approach allows large documents to be analyzed while remaining within Amazon Comprehend processing limits. |