3.2.3 · Lesson 8 of 15
PII Protection
Detect, redact, or anonymize Personally Identifiable Information during model interactions using Guardrails and Comprehend.
WHAT
Detect, redact, or anonymize PII during model interactions.
PII handling modes
| Mode | Behavior | Typical use |
|---|---|---|
| ANONYMIZE | Replace sensitive values with placeholders like [NAME], [EMAIL], [PHONE] | Customer service workflows that must continue |
| BLOCK | Reject the entire request if any configured PII entity is detected | Hard-stop for high-risk identifiers (e.g., credit cards) |
HOW
Configure PII entity actions in Bedrock Guardrails and/or use Amazon Comprehend for pre-checks.
NAME / PHONE / SSN → ANONYMIZE CREDIT_CARD_NUMBER → BLOCK
EXAM TRAP
If the requirement is to obscure email but allow the conversation to proceed, choose ANONYMIZE, not BLOCK.
Key points
- PII ANONYMIZE vs BLOCK
- Bedrock Guardrails PII actions
- Amazon Comprehend entity detection
- [NAME] / [EMAIL] placeholders
- Continue vs terminate request
Exam focus
ANONYMIZE masks PII with placeholders and lets the conversation continue; BLOCK rejects the request outright when PII is detected.