← Cloud Practitioner study path

Technology and services · 11 min

Amazon SageMaker AI and the AWS AI services

In this lesson you will learn the three ways to use AI on AWS, how to choose a ready-to-use AI service based on what you give it and what it returns, and when you need to train your own model with Amazon SageMaker AI.

Machine learning is the technique a program uses to learn to do a task from many examples, and it is what a translation app, a video's automatic captions or identity verification with a selfie use. What the program learns is stored in a model, which is the result of that learning and the thing that then does the task. For example, a model that has seen thousands of reviews labeled as good or bad learns to tell whether a new review is good or bad.

Building one of those models from scratch takes data, specialized people and months of work. However, on AWS you almost never have to start from scratch, because for many tasks AWS has already trained the model for you.

What are the ways to use AI on AWS?

AWS offers three ways to use AI (artificial intelligence), which differ in how much you build: the ready-to-use AI services, Amazon Q and Amazon SageMaker AI. In that order, each option gives you more control than the previous one and also leaves you more work. For example, an online store that wants to translate its product descriptions uses a ready-to-use service, a developer at the store who wants help writing code uses Amazon Q, and if the store wants to predict which customers are going to close their account, it trains its own model in SageMaker AI.

Three ways to use AI on AWS: ready-to-use services, Amazon Q and Amazon SageMaker AI

Ready-to-use AI services

The ready-to-use services don't require any knowledge of machine learning, because AWS has already trained the model for you. To use them, your application sends an image, an audio file or a text to the service's , and the service returns a result. For example, the store sends the text of a review and gets back whether that review is positive or negative.

What goes into and comes out of each AWS AI service

Each service differs in what it receives and what it returns. These are the services you need to know:

  • Amazon Comprehend, which receives text and returns the sentiment, that is, how positive or negative the text is, the entities, which are the names of people, places or brands that appear in it, the key phrases and the language. For example, the store uses it to go through thousands of reviews and find out which ones are negative.
  • Amazon Translate, which receives text and returns the same text in another language. For example, the store translates its product descriptions from Spanish to Portuguese to sell in Brazil.
  • Amazon Polly, which receives text and returns audio with a natural-sounding voice, so an app can read its content aloud and be more accessible for people who can't read the screen. For example, the store's app reads each product's description aloud.
  • Amazon Transcribe, which receives audio and returns text, in real time or with files stored in , and is used for captions or to transcribe calls. For example, the store turns its customer service center's calls into text to review them later.
  • Amazon Lex, which receives voice or text and carries on a conversation, so it is the service for building chatbots, which are programs that chat with the user in writing or by voice. For example, the store builds a chatbot that answers when a customer asks where their order is.
  • Amazon Rekognition, which receives an image or a video and returns the objects, scenes, faces, text and inappropriate content it finds, and which also compares faces. For example, a bank compares the face on an ID with the one in a selfie, and the store checks that the photos its customers upload don't have inappropriate content.
  • Amazon Textract, which receives a scanned document and returns the text with its structure, that is, which value goes in each field of a form and what is in each cell of a table, and which has features for invoices, receipts and identity documents. For example, the store pulls the customer's name and the reason from each scanned return form.

Match each service with its task

0 of 6 pairs

Tap a service and then its task.

0 of 6 pairs.

Services that get confused

Two pairs of these services are easily confused. Polly and Transcribe do the opposite of each other, since Polly converts text to speech and Transcribe converts speech to text. Rekognition and Textract, for their part, can both read text in an image, but when the question talks about forms, invoices or tables, the service to use is Textract, because besides the text it understands which field or cell each piece of data goes in. For example, if the store wants to read the brand written on a product photo, Rekognition works, but if it wants to pull the data from a return form field by field, it uses Textract.

Which service do you use?

An accounting department receives thousands of scanned invoices and wants to extract the total and the date from each one, field by field. Which service does it use?

Amazon Q

Amazon Q is the AWS assistant, and the exam guide includes it among the services that are assessed. An assistant like this answers you in plain words, as if you were chatting with a person. Its Amazon Q Developer version answers questions about AWS, about your resources, which are the things you have created in your account, and about the documentation, and helps you write code in the . Inside the , the Amazon Q Developer chat is now called AWS assistant. For example, a developer at the store can ask it how to save the product photos in S3, or ask for help with a part of their code that doesn't work.

Amazon SageMaker AI

There are cases that no ready-to-use service solves, because they depend on your own company's data. For example, to predict which of the store's customers are going to close their account, a model has to learn from that store's purchase history, which no AWS model knows. For those cases you need your own model, and Amazon SageMaker AI is the for building, training and deploying it, that is, putting it to work so an application can use it. This service was called Amazon SageMaker until December 3, 2024, when AWS renamed it.

Machine learning cycle in SageMaker AI: prepare data, train and deploy

A model in SageMaker AI goes through a three-stage cycle. First the example data is prepared, then the model is trained with it and finally it is deployed so your application can request predictions from it. When new data arrives, the cycle starts again. For example, the store gathers its customers' purchases, uses them to train a model that learns how the customers who left used to behave, and deploys it so its application can ask which customers are at risk of leaving.

Ready-to-use service or your own model?

0 of 5

Tap the correct column for each case.

  1. Predict which customers are going to cancel with your company's data

  2. Transcribe the calls of the customer service center

  3. Detect inappropriate content in the photos your users upload

  4. Build, train and deploy your own model

  5. Translate texts with nobody on the team who knows machine learning

On the exam

AI questions usually describe what goes in and what comes out, and with that you choose the service. These are the phrases in the question that point to each one:

  • "Sentiment" or "entities in a text", which point to Comprehend.
  • "Translate", which points to Translate.
  • "Text to speech", which points to Polly.
  • "Speech to text" or "captions", which point to Transcribe.
  • "Chatbot", which points to Lex.
  • "Faces", "objects in photos" or "moderate images", which point to Rekognition.
  • "Forms", "invoices" or "tables in a scanned document", which point to Textract.
  • "Generative AI assistant", which points to Amazon Q.

Also, the question usually says how much the team knows. If it says "no machine learning experience", the answer is one of the ready-to-use services, and if it says "build, train and deploy its own model", the answer is SageMaker AI. For example, if a school with no machine learning experience wants to add captions to its recorded classes, the answer is Transcribe.

In an account with the new experience

If you use an account with the new AWS experience, not all of these services are included in the free plan. Lex, Polly, Rekognition and SageMaker AI are, and so is Amazon Q Developer, although only with the chat and the diagnostics in the console. On the other hand, Transcribe, Translate and Textract are only available with the paid plan, and Comprehend doesn't appear in the list of services for that account. For example, with the free plan you can try Rekognition with your own photos, but to practice with Textract you need the paid plan.

Review question

A bank wants its customers to open an account from their phone. The app has to check that the face in the selfie matches the one in the ID photo, and the team has no machine learning experience. Which service does it use?