Half of a RAG system's quality and security is decided before any data reaches the model. AIP-C01 skills 1.3 (data validation and processing pipelines) and 3.2 (data security and privacy) test this preparation. Textract, Transcribe, Comprehend, Macie, and Guardrails all "read data or find personal information", which makes them easy to confuse. This post follows raw data on its way to a safe knowledge base and places each service along the route.
Extraction Services by Data Type
| Data | Service | Key capability | |------|---------|----------------| | Scanned documents, PDFs, forms | Amazon Textract | Text, tables, forms, layout, and queries for specific values | | Call recordings, meetings | Amazon Transcribe | Speech to text, speaker diarization, custom vocabulary, PII redaction | | Mixed documents, images, audio, video | Amazon Bedrock Data Automation | Generative AI turns unstructured content into structured output defined by blueprints | | Image understanding | Multimodal FMs | Image plus text input for descriptions and Q&A |
Use for single pages and asynchronous for multi-page PDFs. Layout results make structure-aware hierarchical chunking possible. Add Amazon A2I when only low-confidence extractions need human review. Speaker diarization separates agent and customer turns so you can pass a structured conversation to a summarization prompt. BDA can also act as the parser for Bedrock Knowledge Bases.
Amazon Comprehend
Comprehend finds entities, key phrases, sentiment, and language in text. In GenAI pipelines it enriches metadata with extracted entities (1.3.4), recognizes intent with custom classification (1.6.2), and handles PII (3.2.2, 3.2.3): returns PII types and positions, quickly tells you whether any PII is present, and asynchronous jobs produce redacted copies of documents in S3. Check language support: PII detection works only for English and Spanish, and custom classification doesn't support Korean, Japanese, or Chinese, so use regex patterns or a Bedrock model for those cases. Comprehend Medical detects PHI in clinical text. Note that topic modeling, event detection, and prompt safety classification are closed to new customers as of April 30, 2026; AWS points to Bedrock models and Guardrails instead.
PII Protection: Macie vs Comprehend vs Guardrails
| Factor | Amazon Macie | Amazon Comprehend | Amazon Bedrock Guardrails | |--------|--------------|-------------------|---------------------------| | Looks at | Objects stored in S3 | Text you send to the API | Model prompts and responses | | When | Automated, scheduled discovery | During pipeline processing | At inference time | | Output | Sensitive data findings (EventBridge, Security Hub) | PII types and positions, redacted documents | BLOCK, ANONYMIZE (mask), or NONE (detect only) | | Exam phrasing | "Find which buckets hold sensitive data" | "Remove PII before training or indexing" | "Mask PII in conversations in real time" |
Layer them for defense in depth: Macie watches the source buckets, Comprehend scrubs documents before indexing, Guardrails masks PII in live conversations, and a Lambda post-processor validates output. Two traps: Guardrails masking applies only to what goes into and comes out of the model, so invocation logs still contain the original input (mask them with CloudWatch Logs data protection policies); and the sensitive information filter evaluates text only, so PII in tool-call arguments or tool results must be checked in the tool's Lambda function.
Data Quality and Normalization
AWS Glue Data Quality rules (completeness, uniqueness, value ranges) act as a gate before training or indexing, often orchestrated with Step Functions. SageMaker Data Wrangler and SageMaker Processing handle visual and large-scale preparation, Lambda handles normalization and deduplication, and CloudWatch tracks data quality metrics. Format inputs to each model's JSON request schema and keep conversation history in role-based message format.
!From raw data to a safe knowledge base
Access Control and Retention
Lake Formation applies column- and row-level permissions to data lake tables. S3 Lifecycle rules enforce retention. KMS keys encrypt S3 and vector stores, and VPC endpoints keep Bedrock traffic off the internet. Bedrock doesn't use your prompts and responses to train AWS models or share them with model providers.
Exam Quick Reference
"Extract text and structure from scans and forms" -- Amazon Textract "Transcribe calls and separate speakers" -- Amazon Transcribe "Structure documents, images, audio, and video with one API" -- Bedrock Data Automation "Human review only for low-confidence extractions" -- Textract + Amazon A2I "Remove PII before indexing or training" -- Amazon Comprehend "Detect PHI in medical records" -- Amazon Comprehend Medical "Find sensitive data across S3 buckets" -- Amazon Macie "Mask PII in prompts and responses in real time" -- Bedrock Guardrails "Mask PII left in invocation logs" -- CloudWatch Logs data protection "Data quality gate before indexing" -- AWS Glue Data Quality "Column- and row-level data lake access" -- AWS Lake Formation