CertNote/ Commute Study Notes
Roadmap
KOEN
CLF-C02 · FoundationalCloud Practitioner - Foundational
DVA-C02 · AssociateDeveloper - Associate
SAA-C03 · AssociateSolutions Architect - Associate
SOA-C02 · AssociateCloudOps Engineer - Associate
SAP-C02 · ProfessionalSolutions Architect - Professional
  • Week 1
    • 1.The Game Called the SAP Exam: Hands-On Techniques for Decomposing Scenarios
    • 2.IAM, STS, and Federation: Splitting the Word "Permission" into Six Layers
    • 3.The Anatomy of a VPC: What Route Tables Really Decide
    • 4.Four Compute Pillars in Depth: Revisiting Nitro, EBS, ELB, and Auto Scaling Through a Pro Lens
    • 5.Week 1 Integration: When IAM, VPC, and EC2 Meet in a Single Scenario
  • Week 2
  • Week 3
  • Week 4
  • Week 5
  • Week 6
  • Week 7
  • Week 8
  • Week 9
  • Week 10
    • 1.SageMaker Deep Dive: ML Lifecycle, 4 Types of Inference Endpoints, Training Cost Math
    • 2.Bedrock Deep Dive: Generative AI Architecture, RAG Internals, Vector Search Math
    • 3.Managed AI Services Deep Dive: Pre-trained AI Selection Logic and Sync/Async Patterns
    • 4.MLOps Deep Dive: Science of Drift, Feature Store, Automated Retraining Pipelines
    • 5.Week 10 Comprehensive Review: ML/AI Architecture Decisions + 12 Scenario Questions
  • Week 11
  • Week 12
  • Week 13
  • Week 14
  • Week 15
  • Week 16
DOP-C02 · ProfessionalDevOps Engineer - Professional
Linux Master 2 · 2급KAIT Linux Master - Level 2
SCS-C03 · SpecialtySecurity - Specialty
Linux Master 1 · 1급KAIT Linux Master - Level 1
MLA-C01 · AssociateMachine Learning Engineer - Associate
AIF-C01 · FoundationalAI Practitioner - Foundational
DEA-C01 · AssociateData Engineer - Associate
MLS-C01 · SpecialtyMachine Learning - Specialty
SQLD · 개발자SQL Developer (SQLD)

© CertNote · 주간랩스

  • About
  • Changelog
  • Contact
  • Terms
  • Privacy
← SAP-C02/Week 10/Day 3

Based on the SAP-C02 exam guide·Report an error

SAP-C02· ProWeek 10 · Day 3~32 min read

Day 3 - Managed AI Services Deep Dive: Pre-trained AI Selection Logic and Sync/Async Patterns

80% of ML projects don't actually need "building models from scratch." Extracting amounts from receipts, converting speech to text, filtering inappropriate images, analyzing text sentiment—these are already solved problems. Collecting data and training models for these is wasteful in time, cost, and expertise. AWS's Managed AI (pre-trained AI) Services let you solve these "already-solved problems" with a single API call. In SAP-C02 exams, this domain tests instant-recall matching: "which service fits this scenario?" more than deep theory. But traps abound—distinguishing between Macie vs Comprehend PII, or Kendra vs OpenSearch, requires precision.

Today, instead of listing services, we'll deconstruct the category logic that splits them, why sync/async/batch calling patterns differ, and where the exam's most confusing boundaries lie.

Pre-trained AI Value — The Clear "Build vs Buy" Answer

Imagine building your own OCR model. Label tens of thousands of documents, design a CNN, train on GPUs for days, tune accuracy, build serving infrastructure. Months and hundreds of thousands of dollars later, your result almost certainly won't beat AWS Textract—Textract trained on hundreds of millions of documents and AWS continuously improves it. This is why pre-trained AI is "almost always buy" in the build-vs-buy decision.

These services share common traits: (1) instant use via API call, (2) zero infrastructure/model management, (3) usage-based pricing (per page/minute/image processed). Direct models are only needed for "domain problems AWS services can't solve," and even then transfer-learning customization (like Custom Labels for Rekognition) solves many with minimal data.

💡 Related Theory: Pre-trained AI services rest on transfer learning and large-scale pretraining. AWS trains models on huge general datasets (e.g., Rekognition's object recognition, Comprehend's language understanding), and you add small amounts of your data on top to adapt to your domain (Custom Labels). This requires 100-1000x less data than training from scratch. Pretrained representations already capture general features; you tune only the last layer for your problem. ImageNet pretraining democratized computer vision the same way.

Category Matrix — What Goes Where

CategoryServiceCore Function
NLP (Text Understanding)ComprehendSentiment, entities, language detect, PII detect, topic modeling
NLP-MedicalComprehend MedicalMedical text NER (diagnoses, drugs, dosages)
TranslationTranslateMultilingual real-time translation
Speech→Text (STT)Transcribe (+Medical)Speech recognition, speaker separation, auto subtitles
Text→Speech (TTS)PollyNeural TTS voice synthesis
Document OCRTextractForms, tables, signatures, receipts, IDs
Images/VideoRekognitionObjects, faces, content moderation, text, liveness
SearchKendraEnterprise semantic (natural language) search
ChatbotLexVoice/text bot (Alexa engine)
RecommendationPersonalizeReal-time personalized recommendations
FraudFraud DetectorOnline fraud scoring
Code/OpsCodeGuru / DevOps GuruCode review/profile / ops anomaly detection
HealthcareHealthLake / HealthOmicsFHIR data lake / genomics analysis

What the exam asks: "What's the input and output?" Input is speech → Transcribe. Input is images → Rekognition. Input is documents (with layout) → Textract. Input is free text → Comprehend. Output is speech → Polly. Output is recommendations → Personalize.

Textract Deep Dive — Not Just OCR, But Structure Understanding

Textract differs from generic OCR: it understands document structure (layout). Simple OCR extracts "text from image." But invoices, contracts, IDs matter because "this number is the total, this row/column is quantity"—structural meaning matters. Textract splits this into purpose-specific APIs.

  • DetectDocumentText: Basic text extraction (basic OCR)
  • AnalyzeDocument: Tables, forms (key-value), signatures, queries—structured documents
  • AnalyzeExpense: Receipts/invoices (items, amounts, taxes auto-identified)
  • AnalyzeID: IDs (passport, license)—field extraction
  • Async APIs (StartDocumentAnalysis): Large multi-page PDFs—S3 input, results after completion

🔍 Deep Dive: Async APIs exist separately because of processing time. Single-page receipts finish in ~100ms synchronously, but multi-hundred-page PDFs take tens of seconds to minutes—sync HTTP would timeout. So large jobs call StartDocumentAnalysis (returns JobId), then receive SNS notifications or poll GetDocumentAnalysis for results. This "sync for small, async for large" pattern repeats in Rekognition Video, Transcribe, Comprehend batch—whenever processing time exceeds HTTP timeout, it's async.

🎯 Scenario: "Process monthly tens of thousands of supplier invoice PDFs automatically, extract items/amounts/taxes, mask operator PII from extracted data, store in DB. Best combination?" — Answer: Textract AnalyzeExpense (invoice items/amounts/taxes) + Comprehend DetectPiiEntities (text PII detect/mask) + DynamoDB. AnalyzeExpense specializes in receipts/invoices, auto-identifying items/amounts/taxes (more accurate than generic AnalyzeDocument). Extracted text's PII gets detected/masked by Comprehend. Trap: invoices use AnalyzeExpense (specialized, more accurate than generic AnalyzeDocument), arbitrary text PII uses Comprehend (S3-stored data uses Macie).

Comprehend vs Macie — PII Detection Boundary

This is exam's recurring trap. Both detect PII but target differs.

  • Comprehend DetectPiiEntities: PII in arbitrary text. Send text to API, get PII locations (names, SSNs, card numbers). Real-time text inspection during application flow.
  • Macie: PII in S3 buckets. Scans S3, finds objects with sensitive info, raises security alerts. Data governance/compliance (where's sensitive data stored?).

The key: "is the target flowing text or S3-stored data?"

⚠️ Trap: "Detect PII" problems without explicit target look ambiguous. Decision keyword: S3. "Identify/classify PII in S3 bucket data" = Macie. "Call center transcripts/document content/API text PII" = Comprehend. Using Macie for arbitrary text or Comprehend for S3 governance are both wrong. Bonus: GuardDuty (threat detect), Inspector (vulnerability scan) are unrelated to PII; if they appear in PII problems they're traps.

Kendra vs OpenSearch — Semantic Search vs Keyword Search

Another recurring boundary. Both search, different mechanics.

  • Kendra: Semantic (natural language) search. "What's last year Q4 vacation policy?" understands intent, answers meaningfully. Internal data source connectors (SharePoint, S3, Confluence) and document-level permissions (ACLs) make it enterprise-specialized. ML-based.
  • OpenSearch: Keyword/full-text search (inverted index). Fast, flexible, but fundamentally word-matching. Add vector search and it becomes semantic too, but "managed natural language queries" is Kendra's instant answer.

💡 Related Theory: Kendra's semantic search and RAG (Day 2) are cousins. Both aim to "find documents matching question intent." Difference: Kendra returns search results (documents, excerpts) directly; RAG feeds retrieved documents to LLMs for generative answers. Actually, Kendra can be Bedrock Knowledge Bases' search backend (Kendra retriever). In exams: "natural language query over internal docs" = Kendra, "search + generative conversation answer" = Bedrock RAG (KB), "keyword/log search" = OpenSearch.

Sync vs Async vs Batch — Calling Pattern Logic

Managed AI calling patterns split on processing time and data size.

  • Synchronous: Small input, fast processing. API call returns result immediately (Comprehend single-text sentiment, Rekognition single image, Textract one-page receipt).
  • Asynchronous: Large input, long processing. Start job (get JobId), results written to S3, SNS notification (Rekognition Video, Textract large PDFs, Transcribe long recordings).
  • Batch: Bulk dataset processing (Comprehend batch analysis jobs).

🔍 Deep Dive: Rekognition is sync for images, async for videos because of fundamental timing. Single image analysis finishes in ~100-500ms, so sync response works. One-hour video means frame extraction, object/face/scene tracking—takes minutes to tens of minutes. So video APIs take S3 videos as input, StartLabelDetection starts the job, SNS notifies on completion. Event-driven architecture (S3 → Lambda → Rekognition async → SNS → post-processing) follows naturally. In exams: "long video/large document analysis" is the async + SNS pattern.

Lex, Connect, Personalize, Fraud Detector — Other Key Boundaries

Lex is a voice/text conversational bot builder (intent/slot-based) using the Alexa engine. Connect is a cloud call center platform; they integrate (Connect builds IVR with Lex bots). Exams: "bot itself" = Lex, "call center infrastructure" = Connect. Meanwhile Personalize is Amazon.com's recommendation tech as API—real-time personalization engine—and Fraud Detector scores online transaction fraud. Both exemplify "already solved problems"; there's no reason to build recommendation algorithms or fraud models yourself.

🔍 Deep Dive: Lex bots extract intent (user's goal) and slots (parameters) from user utterances via NLU. "Book me a meeting tomorrow at 3 PM" has intent "book meeting" and slots date=tomorrow, time=3PM. This is fundamentally different from RAG/LLM chatbots—Lex is deterministic conversation flows matching predefined intents; Bedrock Agents use LLM's flexible reasoning. Structured business workflows (booking, ordering, FAQs) suit Lex; open-ended knowledge conversations suit Bedrock. Exams: "structured voice/text bot" = Lex, "internal-knowledge open-form chatbot" = Bedrock RAG.

Summary

Managed AI's core: "already-solved ML problems don't require building—call the API." Map services by input/output type (voice→Transcribe, docs→Textract, images→Rekognition, text→Comprehend), precisely distinguish similar services (Macie=S3 vs Comprehend=arbitrary text, Kendra=semantic vs OpenSearch=keyword), and use async+SNS when processing time runs long.

SAP exam common mappings: (1) "extract receipts/invoices" → Textract AnalyzeExpense, (2) "call center speech→sentiment" → Transcribe + Comprehend, (3) "image inappropriate content" → Rekognition Content Moderation, (4) "S3 PII identify" → Macie / "text PII" → Comprehend, (5) "internal natural language search" → Kendra, (6) "ops anomaly detect" → DevOps Guru, (7) "long video/large PDF" → async API + SNS. Next day: MLOps automating all this ML.

📝 Practice Questions

Click a choice to reveal the answer and explanation.

Question 1

Employees must be able to search documents scattered across an internal wiki and SharePoint by asking natural-language questions such as "What was the travel expense reimbursement policy last year?", and per-document access permissions must be respected. Which service is the most appropriate?

Question 2

You must automatically extract line items, amounts, and taxes from tens of thousands of supplier invoice PDFs per month. Which API is the most accurate and appropriate?

Question 3

You want to analyze call center call recordings (audio files) to extract customer sentiment (positive/negative) and frequently mentioned topics. Which combination should you use?

Question 4

You must identify and classify whether millions of objects stored in S3 buckets contain sensitive personal information (PII) in order to check regulatory compliance. Which service should you use?

Question 5

You must automatically detect and block violent or adult content in photos uploaded by users. Which service/feature should you use?

Question 6

In a production environment made up of EC2, RDS, and Lambda, you want to automatically detect abnormal metrics and signs of failure and receive root causes and recommendations. Which service should you use?

Question 7

You must extract the objects, scenes, and text that appear in a one-hour lecture video. Processing takes several minutes. What is the correct invocation pattern?

📌 Today's Summary

  1. Pre-trained AI = build-vs-buy buy — Already-solved ML problems via API. Domain-specific via Custom Labels/Classification (transfer learning)
  2. Map by input/output — speech→Transcribe, text→Comprehend, docs→Textract, images→Rekognition, recommendations→Personalize
  3. Textract 4 types — DetectText (OCR) / AnalyzeDocument (tables/forms) / AnalyzeExpense (receipts) / AnalyzeID (IDs)
  4. Macie vs Comprehend PII — S3 stored data=Macie, arbitrary text=Comprehend (decision keyword: S3)
  5. Kendra vs OpenSearch — Semantic (NL) + permissions=Kendra, keyword + logs=OpenSearch
  6. DevOps Guru = ops anomaly detect + root cause, CodeGuru = code review + profile
  7. Sync vs Async — Small/fast=sync, large/long (video/big PDF)=async + SNS alert
PreviousBedrock Deep Dive: Generative AI Architecture, RAG Internals, Vector Search MathWeek 10 · Day 2Next MLOps Deep Dive: Science of Drift, Feature Store, Automated Retraining PipelinesWeek 10 · Day 4

Official references

  • SAP-C02 official exam page(opens in a new tab)
  • Amazon S3 documentation(opens in a new tab)
  • Amazon Macie documentation(opens in a new tab)
  • Amazon OpenSearch Service documentation(opens in a new tab)
  • Amazon SNS documentation(opens in a new tab)
  • Amazon Bedrock documentation(opens in a new tab)

On this page

  • Pre-trained AI Value — The Clear "Build vs Buy" Answer
  • Category Matrix — What Goes Where
  • Textract Deep Dive — Not Just OCR, But Structure Understanding
  • Comprehend vs Macie — PII Detection Boundary
  • Kendra vs OpenSearch — Semantic Search vs Keyword Search
  • Sync vs Async vs Batch — Calling Pattern Logic
  • Lex, Connect, Personalize, Fraud Detector — Other Key Boundaries
  • Summary
  • Practice Questions
  • Today's Summary