Back to Notes

AWS AI Services & Bedrock — AWS ML Associate

AWS AI Services & Amazon Bedrock

Pre-built AI APIs — no ML expertise needed. Use when you don't want to build/train your own model.


AI Services Overview

graph TD
    AI[AWS AI Services] --> Vision[Computer Vision]
    AI --> NLP[Natural Language]
    AI --> Speech[Speech]
    AI --> Forecast[Forecasting]
    AI --> Rec[Recommendations]
    AI --> Search[Search]
    AI --> Codegen[Code Generation]
    AI --> GenAI[Generative AI]

    Vision --> Rek[Rekognition<br/>Images + Video]
    NLP --> Comp[Comprehend<br/>Text Analysis]
    NLP --> Tx[Textract<br/>Document OCR]
    NLP --> Trans[Translate]
    NLP --> Kendra[Kendra<br/>Intelligent Search]
    Speech --> Transcribe[Transcribe<br/>Speech → Text]
    Speech --> Polly[Polly<br/>Text → Speech]
    Forecast --> Fore[Amazon Forecast]
    Rec --> Pers[Personalize]
    Search --> Kendra
    GenAI --> Bed[Bedrock<br/>Foundation Models]
    Codegen --> CW[CodeWhisperer]

    style AI fill:#dbeafe,stroke:#3b82f6
    style GenAI fill:#f3e8ff,stroke:#9333ea

Amazon Rekognition

Computer vision API — images and video.

FeatureWhat It Does
Object & Scene DetectionDetect objects (dog, car, tree), scenes (beach, office)
Facial AnalysisDetect faces, attributes (age range, emotion, gender, glasses)
Face ComparisonCompare two faces — similarity score
Face Search (IndexFaces)Match face against a collection (identity verification)
Celebrity RecognitionIdentify famous people
Text in Image (OCR)Detect text in images (signs, license plates)
Content ModerationDetect explicit, violent, or unsafe content
PPE DetectionDetect safety equipment (hard hats, masks)
Label Detection (Video)Detect objects/activities in video, timestamp-based
Segment Detection (Video)Find technical cues (black frames, credits, shots)

Key Use Cases:

  • User verification (match selfie to ID)
  • Content moderation (filter explicit images)
  • Smart media archive (tag and search videos)
  • Workplace safety monitoring (PPE compliance)

Exam tip: Rekognition Custom Labels — train Rekognition on your own images (few-shot) without deep ML knowledge.


Amazon Comprehend

NLP API — extract meaning from text.

FeatureWhat It Does
Sentiment AnalysisPositive / Negative / Neutral / Mixed
Entity RecognitionPersons, organisations, locations, dates, quantities
Key Phrase ExtractionImportant phrases in text
Language DetectionDetect which language the text is in
Syntax AnalysisPOS tagging (noun, verb, adjective)
Topic ModellingDiscover topics in document collection (LDA-based)
PII DetectionFind personally identifiable information (redact or classify)
Custom ClassificationTrain custom text classifier on your categories
Custom Entity RecognitionTrain to recognise custom entities (product codes, internal terms)

Key Use Cases:

  • Customer feedback analysis (sentiment)
  • Legal document processing (entity extraction)
  • Medical records (Comprehend Medical)
  • GDPR compliance (PII detection + redaction)

Amazon Comprehend Medical

  • Specialised NLP for healthcare and medical text
  • Detects: diagnoses, medications, dosage, test results, anatomy
  • Protected Health Information (PHI) detection for HIPAA compliance

Amazon Textract

Extract text and structured data from documents (beyond basic OCR).

FeatureWhat It Does
Text ExtractionDetect and extract all printed/handwritten text
Forms ExtractionExtract key-value pairs from forms (Name: John)
Tables ExtractionExtract tabular data preserving structure
Query-based ExtractionAsk natural language questions ("What is the invoice total?")
Signature DetectionDetect presence of signatures
Expense AnalysisSpecialised for receipts and invoices
Identity DocumentsDriver's licences, passports (structured extraction)

Rekognition vs Textract:

  • Rekognition = text in images (signs, photos)
  • Textract = text in documents (PDFs, forms, tables)

Amazon Transcribe

Automatic Speech Recognition (ASR) — audio/video to text.

FeatureNotes
Streaming TranscriptionReal-time, low-latency
Batch TranscriptionAsync, upload audio file to S3
Speaker DiarisationDistinguish multiple speakers ("Speaker 1:", "Speaker 2:")
Custom VocabularyAdd domain-specific words (medical, legal, brand names)
Custom Language ModelFine-tune on domain-specific text corpus
PII RedactionAuto-remove SSN, credit card numbers from transcript
Toxicity DetectionFlag harmful speech
Medical TranscriptionTranscribe Medical — optimised for clinical vocabulary
SubtitlesGenerate SRT/VTT files for video

Amazon Polly

Text-to-Speech (TTS) — text to lifelike audio.

FeatureNotes
Standard VoicesConcatenative TTS
Neural TTS (NTTS)Higher quality, more natural
SSML SupportMarkup to control emphasis, speed, pauses, pronunciation
LexiconsCustom pronunciation rules (e.g. "AWS" → "Amazon Web Services")
Speech MarksMetadata: word/sentence timings (for lip sync, karaoke)
Long-form TTSOptimised for long documents

Amazon Translate

Neural machine translation — real-time or batch.

  • 75+ languages
  • Formality control — formal vs informal tone
  • Custom terminology — preserve brand names, technical terms
  • Active Custom Translation — fine-tune with parallel data (source → target examples)
  • Real-time: API call with text
  • Batch: S3 input → S3 output

Amazon Lex

Build conversational chatbots — powers Alexa.

ComponentDescription
IntentWhat the user wants to do (BookHotel, GetWeather)
UtteranceExample phrases that trigger the intent
SlotParameter to collect (city, date, room type)
FulfillmentLambda function called when intent is satisfied
  • Supports voice + text
  • Integrates with: Connect (call centres), Kendra (Q&A), Lambda (fulfilment)
  • V2 supports multi-turn conversations and streaming responses

Amazon Kendra

Intelligent enterprise search — NLP-powered.

  • Indexes documents from: S3, SharePoint, Salesforce, ServiceNow, RDS, websites
  • Returns specific answers (not just documents) — understands questions
  • Custom synonyms — map internal terminology
  • Access Control — respects document-level permissions
  • Incremental learning — improves from user feedback

Kendra vs OpenSearch:

  • Kendra = semantic NLP-based question answering, enterprise docs
  • OpenSearch = keyword/full-text search, log analysis, custom ranking

Amazon Forecast

Time series forecasting service — no ML expertise needed.

FeatureNotes
AutoMLAutomatically selects best algorithm
Built-in algorithmsDeepAR+, NPTS, ETS, ARIMA, Prophet
Related time seriesInclude external factors (price, promotions, weather)
Item metadataAdd static attributes (category, brand)
Probabilistic forecastsReturns P10, P50, P90 quantiles (confidence intervals)
What-if AnalysisSimulate scenarios (what if price drops 10%?)
ExplainabilityImpact of each feature on forecast

DeepAR (SageMaker) vs Amazon Forecast:

  • Forecast = fully managed, no code, AutoML
  • DeepAR = more control, custom training, SageMaker integration

Amazon Personalize

Real-time personalisation and recommendation service.

RecipeUse Case
User-PersonalisationPersonalised item recommendations per user
Personalised-RankingRe-rank a pre-filtered list for a user
Similar-Items"Customers also viewed"
Trending-NowItems gaining popularity
Next-Best-ActionPredict next best action/interaction

Concepts:

  • Dataset Group — container for datasets
  • Interactions dataset — required (user-item events: clicks, purchases, ratings)
  • Items dataset — optional (item metadata: category, price)
  • Users dataset — optional (user metadata: age, gender)
  • Solution — trained model (choose recipe)
  • Campaign — deployed solution for real-time recommendations

Real-time vs Batch:

  • Real-time: Campaign endpoint — call API per user
  • Batch: Batch Segment job — generate recs for all users at once → S3

Amazon Bedrock

Fully managed access to Foundation Models (FMs) via API.

Overview

  • No infrastructure to manage — call FM via API
  • Models from: Anthropic (Claude), Meta (Llama), Mistral, Amazon (Titan), Cohere, AI21
  • Private — your data and prompts are NOT used to train base models
  • Fine-tuned models stay in your account

Core Features

FeatureDescription
Model InferenceCall any supported FM via unified API
Knowledge BasesManaged RAG — connect FM to your documents
AgentsAutonomous agents that call APIs and take actions
Fine-tuningCustomise FM with your labelled data
Continued Pre-trainingAdapt FM to your domain with unlabelled data
Model EvaluationCompare models on custom prompts
GuardrailsFilter harmful content, PII, off-topic responses
Watermark DetectionDetect AI-generated text (Amazon Titan)

Knowledge Bases (RAG)

graph LR
    Docs[Your Documents<br/>S3] --> KB[Knowledge Base<br/>Bedrock]
    KB --> VS[Vector Store<br/>OpenSearch / Aurora / Pinecone]
    User[User Query] --> KB
    KB --> FM[Foundation Model]
    FM --> Answer[Grounded Answer]
  • Manages chunking, embedding, and vector store indexing automatically
  • Supported vector stores: OpenSearch Serverless, Aurora PostgreSQL, Pinecone, Redis Enterprise

Bedrock Agents

  • Autonomously break tasks into steps, call APIs, retrieve knowledge
  • Action Groups — define what APIs the agent can call (Lambda + OpenAPI spec)
  • Memory — agents can remember conversation context across sessions
  • Use for: customer service automation, data analysis, multi-step workflows

Guardrails

  • Content filtering — block hate speech, violence, sexual content
  • Denied topics — block specific subjects (e.g. competitor mentions)
  • Word filters — block specific words/phrases
  • PII redaction — detect and redact personal data
  • Grounding check — verify response is grounded in context (reduces hallucination)

Amazon Titan Models

ModelType
Titan Text Premier/Express/LiteText generation
Titan Text EmbeddingsText embeddings for RAG
Titan Multimodal EmbeddingsImage + text embeddings
Titan Image GeneratorText-to-image

AI Services — Exam Comparison Table

ScenarioService
Detect objects in uploaded photosRekognition
Moderate user-generated contentRekognition Content Moderation
Verify user identity with face matchRekognition Face Comparison
Extract sentiment from customer reviewsComprehend
Find medical terms in clinical notesComprehend Medical
Extract tables from PDF invoicesTextract
Transcribe call centre recordingsTranscribe
Build IVR chatbot for call centreLex + Connect
Enterprise document search ("What is our leave policy?")Kendra
Demand forecasting with promotions dataAmazon Forecast
Personalised product recommendationsPersonalize
Text-to-speech for e-learningPolly
Translate product listings to 10 languagesTranslate
Build RAG chatbot on company documentsBedrock Knowledge Bases
Build autonomous AI agent for customer serviceBedrock Agents
Fine-tune Claude on proprietary dataBedrock Fine-tuning
Prevent AI from responding off-topicBedrock Guardrails
Access GPT-like model without OpenAIBedrock (Claude, Titan, Llama)