AI and Machine Learning Services

SageMaker AI, Bedrock, Amazon Q and the ready-made AI services (Rekognition, Comprehend, Lex, Polly, Transcribe, Translate, Textract, Kendra, Personalize), plus AWS ML chips.

What is it?

Artificial intelligence (AI) is machines doing things that normally need human intelligence. Machine learning (ML) is a kind of AI where a system gets better at a task by learning from data instead of being explicitly programmed. Deep learning is ML using artificial neural networks loosely inspired by the brain. Generative AI creates new content such as text, images, audio or code, usually with large foundation models.

AWS offers three layers, and the exam mostly asks you to pick the right one:

  • Ready-made AI services: call an API, no ML knowledge needed (Rekognition, Polly, Comprehend and friends below).
  • Generative AI services: Amazon Bedrock and Amazon Q.
  • ML platform: Amazon SageMaker AI to build, train and deploy your own models, plus AWS chips and machine images for running them.

Ready-made AI services (know what each one does):

  • Amazon Rekognition: analyse images and video to detect objects, people, faces, celebrities, unsafe content and text.
  • Amazon Textract: pull text, forms and tables out of scanned documents (more than plain OCR, it keeps the structure).
  • Amazon Comprehend: natural language processing; finds sentiment, entities, key phrases and topics in text such as reviews, support tickets, emails and social posts.
  • Amazon Translate: neural machine translation between languages.
  • Amazon Transcribe: speech to text (call recordings into transcripts, subtitles).
  • Amazon Polly: text to speech (lifelike voices reading text aloud).
  • Amazon Lex: build voice and text chatbots; the same conversational technology as Alexa, often used inside Amazon Connect.
  • Amazon Kendra: intelligent enterprise search that answers natural-language questions from your documents instead of only matching keywords.
  • Amazon Personalize: real-time personalised recommendations, based on the technology behind Amazon.com recommendations.

Generative AI

  • Amazon Bedrock: a fully managed API service giving access to many foundation models (text, image and embeddings) from Amazon and third-party providers. You build generative AI apps, chatbots and agents, and customise models with your own data, without managing any infrastructure. It is a building block for developers, not a chat app.
  • Amazon Q: generative AI assistants. Amazon Q Developer (formerly Amazon CodeWhisperer) suggests and explains code in your IDE and helps with AWS tasks; Amazon Q Business answers questions over company data.

Building your own models

  • Amazon SageMaker AI (formerly just Amazon SageMaker; the 'Amazon SageMaker' name now covers a wider data and AI platform): fully managed service to build, train, tune and deploy ML models at scale, with frameworks such as PyTorch, TensorFlow and Hugging Face models. SageMaker Ground Truth labels training data using human labellers, and Amazon Augmented AI (A2I) sends low-confidence predictions to people for review.
  • AWS Deep Learning AMIs and Deep Learning Containers come with popular frameworks preinstalled.
  • AWS chips for ML: AWS Trainium accelerates training, AWS Inferentia accelerates inference (running a trained model), and the AWS Neuron SDK runs ML frameworks on both. Inferentia is not a GPU; GPU instances use NVIDIA or AMD chips. Amazon Elastic Inference was discontinued; use Inferentia-based instances or GPUs instead.

ML used inside other services: Amazon DevOps Guru spots abnormal application behaviour from operational metrics, logs and events. Amazon CodeGuru reviews code and profiles application performance, and Amazon Fraud Detector finds online fraud such as fake accounts; check current availability for these two before choosing them, as AWS has been winding down several older ML services. Older study material may also mention DeepLens, DeepComposer, Elastic Inference, Forecast or the Lookout services, which are discontinued or closed to new customers.

Exam tip: the direction words matter. Polly turns text into speech; Transcribe turns speech into text; Translate changes language; Textract extracts text from documents; Comprehend understands the meaning of text.

Explain like I'm 10

Think of a restaurant. The ready-made AI services are dishes on the menu: order 'translation' and it arrives. Bedrock is a pantry stocked with prepared sauces from many famous chefs that you combine into your own dish. SageMaker AI is a fully equipped professional kitchen where you invent recipes from scratch. Trainium and Inferentia are specialised ovens: one for developing new recipes, one for serving thousands of plates fast.

Examples

Which AI service?

Need                                         Service
-------------------------------------------  ----------------
Find faces/objects in photos or video        Rekognition
Read forms and tables from scanned PDFs      Textract
Sentiment of customer reviews                Comprehend
Turn call recordings into text               Transcribe
Read articles aloud                          Polly
Translate a website                          Translate
Customer-service chatbot                     Lex
Search company docs with questions           Kendra
"Customers also bought" recommendations      Personalize
Build a gen AI app on foundation models      Bedrock
AI coding assistant in the IDE               Amazon Q Developer
Train and deploy a custom model              SageMaker AI

Calling ready-made AI services from the CLI

# Sentiment of a sentence
aws comprehend detect-sentiment --language-code en \
  --text "The delivery was late but support was brilliant."

# Labels in an image stored in S3
aws rekognition detect-labels \
  --image '{"S3Object":{"Bucket":"my-photos","Name":"street.jpg"}}' \
  --max-labels 5

# Text to speech
aws polly synthesize-speech --output-format mp3 --voice-id Joanna \
  --text "Hello from Amazon Polly" hello.mp3

No model training is involved: each call sends data to a pre-trained AWS model and returns the result.

How it works

Ready-made services host pre-trained models behind an API. You send an image, text or audio and get structured results back, paying per request or per unit processed.

Bedrock hosts foundation models behind one API. Your app sends a prompt and gets generated output; you can ground answers in your own documents (retrieval-augmented generation), add guardrails and build agents, while AWS runs the infrastructure.

SageMaker AI covers the full ML lifecycle: prepare and label data, train a model on managed compute (which can use Trainium or GPU instances), evaluate it, then deploy it to an endpoint (which can use Inferentia) that applications call for predictions.

  More control / effort
       ^
       |  SageMaker AI   build, train, deploy own models
       |                 (Trainium train, Inferentia infer)
       |  Bedrock / Q    generative AI on foundation models
       |  AI services    Rekognition, Comprehend, Polly...
       +------------------------------------------> ease

Why does it exist?

Building ML from scratch needs specialist skills, lots of data and expensive hardware. AWS packages common AI tasks as simple APIs, gives managed access to foundation models, and runs the heavy training and hosting infrastructure, so teams can add AI features without building everything themselves.

When to use it

Use a ready-made AI service when your task matches one (detecting faces, transcribing calls, translating text). Use Bedrock to build generative AI features on existing foundation models, Amazon Q for AI assistance for developers and employees, and SageMaker AI when you need a custom model trained on your own data.

When not to use it

Do not train a custom model in SageMaker AI when a ready-made service already does the job. Do not use AI services where simple rules or a database query give an exact answer. Do not send sensitive data to any AI service without checking data handling, Region and compliance requirements.

Common mistakes

  • Mixing up Polly (text to speech) and Transcribe (speech to text).

  • Choosing Comprehend to extract text from a scanned form; that is Textract (Comprehend analyses text you already have).

  • Thinking Bedrock is a chatbot app like a consumer AI chat site; it is an API service for building apps on many foundation models.

  • Calling Inferentia a GPU or a training chip; it is an inference accelerator, and Trainium is for training.

  • Using old names on the exam: CodeWhisperer is now Amazon Q Developer, and SageMaker is now SageMaker AI.

  • Reaching for SageMaker AI to build image recognition from scratch when Rekognition already provides it.

Practice exercises

  1. Easy:

    Match each service to its job without notes: Polly, Transcribe, Translate, Textract, Comprehend, Rekognition, Lex, Kendra, Personalize.

  2. Medium:

    Design a call-center analytics flow: recordings become text, the text gets a sentiment score, and negative calls are flagged. Name each AWS service.

  3. Medium:

    Explain when a company should pick Bedrock rather than SageMaker AI, with one example each.

  4. Hard:

    A retailer wants a support chatbot that answers from its own policy documents. Sketch an architecture using Lex or Bedrock plus a search or knowledge source, and list the risks to manage.

Interview questions

Exam-style: Which service converts text into lifelike speech?

Amazon Polly.

Exam-style: Which service converts speech into text?

Amazon Transcribe.

Exam-style: Which service detects objects, faces and inappropriate content in images and video?

Amazon Rekognition.

Exam-style: Which service extracts text, forms and tables from scanned documents?

Amazon Textract.

Exam-style: Which service determines the sentiment of customer reviews?

Amazon Comprehend.

Exam-style: Which service builds conversational chatbots with voice and text?

Amazon Lex.

Exam-style: Which service gives intelligent search over enterprise documents using natural-language questions?

Amazon Kendra.

Exam-style: Which service provides real-time product recommendations?

Amazon Personalize.

Exam-style: Which service provides API access to foundation models from Amazon and other providers for generative AI apps?

Amazon Bedrock.

Exam-style: Which fully managed service lets data scientists build, train and deploy custom ML models?

Amazon SageMaker AI.

Exam-style: Which AI assistant generates code suggestions in the IDE (formerly CodeWhisperer)?

Amazon Q Developer.

Trainium vs Inferentia?

Trainium is AWS's chip for training ML models; Inferentia is its chip for low-cost, high-performance inference. Both use the AWS Neuron SDK.

AI vs ML vs deep learning?

AI is the broad goal of machines acting intelligently; ML is AI that learns from data; deep learning is ML using multi-layer neural networks.