Skill 1.1.1: Extract data from data sources
Question 1 - Selecting the Right AWS AI Service for Document Processing
A financial services company is building an automated mortgage application processing pipeline. The system must extract text, form fields, and table structures from scanned PDF loan documents, including hand-filled sections and variations in document layouts. The compliance team requires that extracted data retains spatial relationships (bounding boxes and coordinates) for downstream validation workflows. The company wants to avoid building and maintaining custom OCR models.
Which AWS service should the ML engineer use to meet these requirements?
- A) Amazon Comprehend with custom entity recognition
- B) Amazon Textract with the
AnalyzeDocumentAPI - C) Amazon Rekognition with custom labels
- D) Amazon SageMaker with a pre-trained OCR model from JumpStart
- E) Amazon Bedrock with a multimodal foundation model
Click to reveal Answer & Explanation
Correct Answer: B
Correct Answer Analysis
- B is Correct: Amazon Textract's
AnalyzeDocumentAPI is purpose-built for extracting text, form fields (key-value pairs), and table structures from scanned documents while preserving spatial information (bounding box coordinates). It handles layout variations natively without custom model training, satisfying the compliance requirement for positional metadata.
Distractor Analysis
- A is Incorrect: Amazon Comprehend performs NLP tasks (entity extraction, sentiment, key phrase detection) on text that has already been extracted. It cannot OCR scanned PDFs or provide spatial coordinates for document elements.
- C is Incorrect: Amazon Rekognition analyzes images and video for visual content (objects, scenes, faces, moderation). It is not designed for document text extraction or form/table parsing.
- D is Incorrect: While SageMaker JumpStart offers pre-trained models, deploying and managing an OCR model introduces unnecessary operational overhead when Amazon Textract already provides this capability as a fully managed service.
- E is Incorrect: While Bedrock multimodal FMs can process images, they are not optimized for precise form field extraction and table structure recovery with guaranteed bounding box coordinates, and using them for this task would be less cost-effective than purpose-built Textract.
Key Takeaway: Amazon Textract is the managed AWS AI service of choice for structured document analysis—use
AnalyzeDocumentfor forms and tables with spatial metadata, andAnalyzeExpensefor invoice-specific extraction.
Question 2 - Managed AI Service vs. Foundation Model for Image Classification
A retail chain is deploying a real-time inventory monitoring system across 500 stores. Each store has IP cameras that capture images of store shelves. The system must detect when specific product types (e.g., beverage bottles, snack boxes) are out of stock or misplaced, and trigger restock alerts within 2 seconds of image capture. The operations team needs high precision object detection with minimal infrastructure management, and the solution must scale to millions of images per day without manual intervention.
Which approach should the ML engineer choose to meet these requirements with the LEAST operational overhead?
- A) Fine-tune a multimodal foundation model on Amazon Bedrock for product detection
- B) Train a custom YOLO model on SageMaker AI for shelf monitoring
- C) Use Amazon Rekognition custom labels to train a product-specific detection model
- D) Call Amazon Textract to analyze shelf images for product presence
- E) Write fixed-position rules that compare pixel colors at set locations on shelves
Click to reveal Answer & Explanation
Correct Answer: C
Correct Answer Analysis
- C is Correct: Amazon Rekognition Custom Labels provides fully-managed custom object detection without requiring deep learning infrastructure expertise. You upload labeled images of your products, train a custom model, and deploy it via API—satisfying low operational overhead, real-time inference (Rekognition Custom Labels supports <2s latency via deployed endpoints), and product-specific detection requirements.
Distractor Analysis
- A is Incorrect: Fine-tuning a multimodal FM on Bedrock for object detection is overkill—Rekognition Custom Labels provides a purpose-built managed path for visual detection tasks, avoiding the complexity of dataset preparation and fine-tuning jobs for FMs.
- B is Incorrect: Training a custom YOLO model on SageMaker AI requires managing GPU instances, hyperparameter tuning, and inference endpoints—significant operational overhead compared to a fully managed Rekognition service.
- D is Incorrect: Amazon Textract is designed for document text extraction (forms, tables, OCR) in scanned files, not for retail product detection on shelf images. Using Textract would be a fundamental misapplication of the service.
- E is Incorrect: Fixed pixel-color rules are extremely brittle and will fail with variations in lighting, shelf depth, packaging changes, and camera angles.
Key Takeaway: For custom visual classification/detection tasks, Amazon Rekognition Custom Labels provides a managed middle path between generic pre-trained models and full custom deep learning (SageMaker) — matching "least operational overhead" requirements.
Question 3 - Invoice Processing with Amazon Textract AnalyzeExpense
A logistics company processes 50,000 vendor invoices daily, with invoices arriving in multiple languages and varying formats. The accounting team needs to extract line item details (description, quantity, unit price, total), vendor tax IDs, invoice totals, and billing addresses. The extracted data must feed directly into an ERP system for automated reconciliation, and the ML team wants to avoid building custom parsing logic for invoice layouts.
Which Amazon Textract API should the ML engineer use for this specific use case?
- A)
DetectDocumentText - B)
AnalyzeDocumentwithTABLESfeature - C)
AnalyzeExpense - D)
AnalyzeID - E)
StartDocumentAnalysiswithFORMSfeature
Click to reveal Answer & Explanation
Correct Answer: C
Correct Answer Analysis
- C is Correct:
AnalyzeExpenseis specifically designed for invoice and receipt processing. It automatically extracts summary fields (invoice totals, vendor tax IDs, billing addresses) and line item groupings (description, quantity, unit price, total) across varying invoice formats and multiple languages, without requiring layout-specific rules.
Distractor Analysis
- A is Incorrect:
DetectTextDocumentperforms basic OCR and returns raw text with bounding boxes, but does not understand structured invoice fields or line-item groupings—the accounting team would need custom parsing logic on top of raw text. - B is Incorrect:
AnalyzeDocumentwithTABLESextracts generic tables from any document. While it can capture line items in table format, it does not provide invoice-specific field recognition (vendor tax IDs, billing address classifications) or line-item grouping semantics thatAnalyzeExpenseoffers. - D is Incorrect:
AnalyzeIDis specifically for processing identity documents (driver's licenses, passports), not vendor invoices. It extracts identity-specific fields and does not understand invoice line items. - E is Incorrect:
StartDocumentAnalysiswithFORMSis for generic form extraction across standard documents. It lacks invoice-specific field understanding, requiring downstream custom logic to map key-value pairs to ERP fields.
Key Takeaway: Amazon Textract offers specialized APIs for different document types—use
AnalyzeExpensefor invoices and receipts,AnalyzeIDfor identity documents, andAnalyzeDocumentfor generic forms and tables.
Question 4 - Choosing Between Comprehend Custom Classification and Bedrock FM
A customer support team receives 200,000 emails daily across 50 predefined categories (refund requests, technical issues, billing inquiries, etc.). The classification system must integrate with existing Microsoft Dynamics workflows, provide real-time classification (<500ms latency), and be auditable—the compliance team requires deterministic, explainable classification logic with model versioning. The company already has 2 million historically labeled emails.
Which approach should the ML engineer recommend?
- A) Use Amazon Comprehend custom classification with the labeled email dataset
- B) Use Amazon Bedrock with a foundation model and few-shot prompting for classification
- C) Fine-tune a foundation model on Amazon Bedrock for the email classification task
- D) Use Amazon Textract to parse email content and extract classification categories
- E) Write keyword-based rules that match keywords to predefined categories
Click to reveal Answer & Explanation
Correct Answer: A
Correct Answer Analysis
- A is Correct: Amazon Comprehend custom classification is purpose-built for training a text classifier on your own labeled data. With 2 million labeled examples across 50 categories, Comprehend can train a custom classifier that provides deterministic, versioned outputs with real-time inference (<500ms via synchronous
ClassifyDocumentAPI), and integrates with existing workflows via API. This satisfies auditability and interpretability requirements.
Distractor Analysis
- B is Incorrect: Using Bedrock FMs with few-shot prompting would require including 50 category descriptions and multiple examples in every prompt, driving up token usage and cost while lacking deterministic behavior—FM outputs can vary between calls, making compliance auditing difficult.
- C is Incorrect: Fine-tuning a foundation model for classification is overkill given the dataset size and requirement for deterministic, explainable outputs. Comprehend custom classification provides a lighter-weight, more interpretable supervised approach.
- D is Incorrect: Amazon Textract is for extracting text from scanned documents, not for classifying the semantic content of emails. It does not perform text classification.
- E is Incorrect: Keyword matching rules are brittle and will fail to generalize to paraphrased or context-dependent language (e.g., "my card stopped working" for a technical issue vs. "I want my money back" for a refund request).
Key Takeaway: Amazon Comprehend custom classification is the right choice when you have labeled text data and need deterministic, versioned classification—use Bedrock FMs when labels are scarce and language understanding is the core capability needed.
Question 5 - Speech-to-Text for Call Center Analytics
A healthcare call center needs to transcribe patient calls for clinical documentation. Calls are in English and Spanish, include medical terminology, and must be processed in real-time to provide live transcription for agents. Compliance requires HIPAA-eligible encryption and the ability to identify which speaker said what. The solution must support streaming audio input as calls occur.
Which AWS service configuration should the ML engineer implement?
- A) Amazon Transcribe with
StartStreamTranscriptionusing medical vocabulary and channel identification - B) Amazon Comprehend with custom entity recognition to identify speakers in audio
- C) Amazon Bedrock with a multimodal FM processing audio streams
- D) Amazon SageMaker with a custom speech-to-text model trained on call recordings
- E) Amazon Textract to extract text from audio transcript files
Click to reveal Answer & Explanation
Correct Answer: A
Correct Answer Analysis
- A is Correct: Amazon Transcribe
StartStreamTranscriptionsupports real-time streaming audio transcription, automatic language identification (including English and Spanish), custom medical vocabularies for domain-specific terms, and channel identification for speaker diarization (multi-speaker separation). Transcribe Medical is HIPAA-eligible, satisfying compliance requirements.
Distractor Analysis
- B is Incorrect: Amazon Comprehend is for analyzing text, not audio. It cannot transcribe speech or identify speakers from audio streams. Entity recognition operates on text input only.
- C is Incorrect: Bedrock multimodal FMs are not optimized for streaming real-time audio transcription with medical vocabulary customization and HIPAA compliance guarantees. Transcribe provides purpose-built features for call center audio processing.
- D is Incorrect: Training a custom speech-to-text model on SageMaker requires massive amounts of labeled audio data, GPU infrastructure management, and streaming inference setup—vastly more operational overhead than Transcribe's managed streaming API.
- E is Incorrect: Amazon Textract processes scanned documents and images for text extraction, not audio files. It cannot transcribe speech.
Key Takeaway: Amazon Transcribe is the managed AWS service for speech-to-text—use
StartStreamTranscriptionfor real-time processing with custom vocabularies and channel identification for multi-speaker calls.
Question 6 - Multi-Service Document Pipeline Architecture
An insurance company digitizes claim documents for an automated adjudication system. The pipeline must: (1) extract text and tables from scanned PDFs, (2) identify entities like policy numbers, claimant names, and injury dates from extracted text, (3) detect sentiment in written statements, and (4) generate summaries of each claim for adjuster review. The company wants minimal custom ML code and maximal use of AWS managed services.
Which combination of AWS services should the ML engineer use? (Select TWO)
- A) Amazon Textract for document text and table extraction
- B) Amazon Comprehend for entity detection and sentiment analysis
- C) Amazon SageMaker for training a custom document parsing model
- D) Amazon Rekognition for detecting claim document content
- E) AWS Glue for OCR processing of scanned PDFs
Click to reveal Answer & Explanation
Correct Answer: A and B
Correct Option Analysis
- A is Correct: Amazon Textract is the managed service for extracting text and structured table data from scanned documents, handling OCR without custom models.
- B is Correct: Amazon Comprehend natively performs entity detection (custom entities like policy numbers) and sentiment analysis on text. It integrates seamlessly with Textract output to process extracted claim text.
Distractor Analysis
- C is Incorrect: Training a custom document parsing model on SageMaker duplicates Textract's capabilities with significant operational overhead—no custom ML code is needed when Textract already solves this.
- D is Incorrect: Amazon Rekognition is for image/video analysis (object detection, faces, scenes), not document text extraction. It cannot parse PDFs or identify document-specific content.
- E is Incorrect: AWS Glue is an ETL service for data cataloging and transformation, not a document OCR service. It lacks document text extraction capabilities.
Key Takeaway: Compose AWS AI services into pipelines—Textract for OCR/forms/tables, Comprehend for NLP tasks (entities, sentiment), Transcribe for audio, and Rekognition for visual analysis. Each handles its specific modality.
Question 7 - Cost-Effective Audio Transcription for Podcast Archive
A media company has 10,000 hours of podcast audio archives that need transcription for search and indexing. The transcripts will be used for search functionality with a 24-48 hour turnaround requirement. The company wants the most cost-effective solution with minimal management, and latency is not critical.
Which Amazon Transcribe API should the ML engineer use?
- A)
StartStreamTranscriptionwith real-time processing - B)
StartTranscriptionJobwith batch processing mode - C)
CreateLanguageModelwith a custom model for each podcast - D)
StartMedicalStreamTranscriptionfor medical podcast content - E)
StartCallAnalyticsJobfor podcast analysis
Click to reveal Answer & Explanation
Correct Answer: B
Correct Answer Analysis
- B is Correct:
StartTranscriptionJobis Amazon Transcribe's asynchronous batch API designed for offline transcription of pre-recorded audio. It processes large audio files asynchronously and is significantly more cost-effective than real-time streaming. A 24-48 hour turnaround requirement is easily met by batch jobs, making this the optimal cost-to-performance balance.
Distractor Analysis
- A is Incorrect:
StartStreamTranscriptionis for real-time audio processing (captions, live calls). Using it for 10,000 hours of archived audio would be impractical and substantially more expensive due to real-time processing rates. - C is Incorrect:
CreateLanguageModelis for creating custom language models to improve accuracy on domain-specific vocabulary, not for transcribing content. It's an additional training step, not a transcription method. - D is Incorrect:
StartMedicalStreamTranscriptionis real-time streaming for healthcare audio. It is both the wrong deployment mode (streaming vs. batch) and the wrong domain (medical vs. general podcast content), leading to unnecessary cost. - E is Incorrect:
StartCallAnalyticsJobis designed for analyzing customer-agent call center conversations (sentiment, categories, interruptions), not general podcast transcription. It adds unwanted analysis features that increase cost without benefit for podcast archiving.
Key Takeaway: Choose between Amazon Transcribe's streaming and batch APIs based on latency requirements—use
StartTranscriptionJobfor cost-optimized offline processing andStartStreamTranscriptionfor real-time needs.
Question 8 - Video Content Moderation for User-Generated Content Platform
A social media platform allows users to upload videos that need to be screened for inappropriate content (violence, adult content, hate symbols) before publication. Videos can be up to 2 hours long and are submitted continuously throughout the day. The platform needs automated video analysis with human review for flagged content, and the solution must scale to thousands of videos per hour without manual infrastructure management.
Which AWS service should the ML engineer use?
- A) Amazon Rekognition with
StartContentModerationfor async video analysis - B) Amazon Rekognition with
DetectModerationLabelsfor real-time images - C) Amazon Comprehend for video transcript moderation
- D) Amazon Bedrock with a multimodal FM for video content analysis
- E) Amazon SageMaker with a custom video classification model
Click to reveal Answer & Explanation
Correct Answer: A
Correct Answer Analysis
- A is Correct: Amazon Rekognition
StartContentModerationprovides asynchronous, scalable video analysis designed for detecting inappropriate content across long-form videos. It processes videos up to 2 hours, returns timestamps of content violations, and can trigger Amazon Augmented AI (A2I) workflows for human review of flagged frames—exactly matching the platform's requirements without infrastructure management.
Distractor Analysis
- B is Incorrect:
DetectModerationLabelsprocesses single images/frames in real-time. While useful for still images, it does not handle 2-hour video analysis with temporal context or async batch processing for thousands of videos per hour. - C is Incorrect: Amazon Comprehend analyzes text, not video. It can moderate video transcripts but misses visual content violations (image-based inappropriate content, hate symbols, violent scenes) that Rekognition detects.
- D is Incorrect: Bedrock multimodal FMs are not optimized for systematic video content moderation at scale. Rekognition provides purpose-built content moderation algorithms that provide deterministic, structured moderation labels and timestamps.
- E is Incorrect: Training a custom video classification model on SageMaker requires massive labeled video datasets, GPU infrastructure for training and inference, and significant engineering effort—contradicting the "without manual infrastructure management" requirement.
Key Takeaway: Amazon Rekognition offers both real-time (
DetectModerationLabels) and asynchronous (StartContentModeration) content moderation—choose async video processing for long-form content requiring frame-level analysis and human review integration.
Question 9 - Real-Time Sentiment Analysis for Social Media Monitoring
A brand management team monitors Twitter/X mentions of their products in real-time. They need instant sentiment analysis (positive, negative, neutral) on incoming tweets, with entity detection for competitor mentions, brand names, and product lines. The system must process tweets at a rate of 100 tweets per second with sub-second latency, and the team wants zero infrastructure management.
Which service configuration should the ML engineer recommend?
- A) Amazon Comprehend with synchronous
DetectSentimentandDetectEntitiesAPIs - B) Amazon Bedrock with a foundation model using few-shot prompts for sentiment classification
- C) Fine-tune a foundation model on Amazon Bedrock for brand-specific sentiment
- D) Amazon SageMaker with a custom LSTM model for sentiment analysis
- E) Amazon Textract with form extraction to parse tweet content
Click to reveal Answer & Explanation
Correct Answer: A
Correct Answer Analysis
- A is Correct: Amazon Comprehend provides synchronous APIs (
DetectSentiment,DetectEntities) designed for real-time text analysis at scale. Comprehend is fully managed, requires no infrastructure, handles 100+ requests per second with sub-second latency (metrics vary based on text length), and provides both sentiment classification and entity detection natively.
Distractor Analysis
- B is Incorrect: Using Bedrock FMs for sentiment classification via few-shot prompting would add per-token latency and cost for every tweet. FMs introduce variable output formats, potential hallucination, and higher costs compared to Comprehend's deterministic, purpose-built sentiment API.
- C is Incorrect: Fine-tuning a foundation model for sentiment analysis is unnecessary when Comprehend already provides pre-trained sentiment models. Fine-tuning introduces data preparation, training cost, and versioning overhead without measurable benefit over Comprehend for this use case.
- D is Incorrect: Custom LSTM on SageMaker requires infrastructure management, model training, and inference endpoint maintenance—violating the "zero infrastructure management" requirement. Comprehend provides equivalent performance as a fully managed service.
- E is Incorrect: Amazon Textract extracts text from scanned documents, not from raw text inputs. Tweets are already in text format, making Textract completely misaligned with the use case.
Key Takeaway: For real-time NLP tasks (sentiment, entities, key phrases), Amazon Comprehend's synchronous APIs provide deterministic, cost-effective, and low-latency responses—reserve Bedrock FMs for generative tasks that Comprehend cannot perform.
Question 10 - Hybrid Approach for Multi-Modal Document Processing
A legal tech startup is building a contract analysis platform. The platform must: (1) extract text and tables from scanned contracts, (2) identify legal clauses (indemnification, termination, confidentiality), (3) classify contract types (NDA, MSA, employment agreement), and (4) generate plain-language summaries of complex legal language for non-lawyer clients. The startup wants to minimize development time while providing all four capabilities.
Which combination of AWS services should the ML engineer use? (Select THREE)
- A) Amazon Textract for document text and table extraction
- B) Amazon Comprehend custom classification for contract type detection
- C) Amazon Bedrock with a foundation model for generating plain-language summaries
- D) Amazon SageMaker for training a custom legal clause detection model
- E) Amazon Rekognition for detecting legal clauses in contract images
Click to reveal Answer & Explanation
Correct Answer: A, B, and C
Correct Option Analysis
- A is Correct: Amazon Textract is the managed service for extracting text, tables, and structured data from scanned contracts.
- B is Correct: Amazon Comprehend custom classification trains on labeled contract types (NDA, MSA, employment) and provides deterministic classification—appropriate for multi-class text classification.
- C is Correct: Amazon Bedrock with a foundation model handles generative text summarization, translating complex legal language into plain English—a capability that Comprehend and Textract cannot provide.
Distractor Analysis
- D is Incorrect: Training a custom SageMaker model for legal clause detection requires building a labeled legal document dataset, implementing deep learning architectures, and managing infrastructure—significant development time that doesn't align with the startup's minimal-development-time goal. Comprehend's custom classification and entity recognition can handle clause identification.
- E is Incorrect: Amazon Rekognition analyzes images and video for visual content (objects, scenes, faces), not text or legal clause semantics. It cannot extract or analyze textual clauses from contract documents.
Key Takeaway: Match each pipeline capability to its specialized AWS service—Textract for document extraction, Comprehend for classification/entities/sentiment, and Bedrock FMs for generative tasks (summarization, Q&A) that traditional NLP services cannot perform.