Machine learning and analytics services

The analytics services in the order data passes through them, and the pre-trained artificial intelligence services sorted by what you feed them, so a scenario can be answered without knowing anything about the models underneath.

Lesson 9 of 11 in objective 3. Cloud technology and services, part of AWS Certified Cloud Practitioner (CLF-C02).

A question asked of data in S3, and the service that owns each step. In order: Amazon Data Firehose (receives the stream and lands it, buffered by size or time), then Amazon S3 (the data lake — the files stay where they are), then AWS Glue (catalogs what those files contain, and runs ETL over them), then Amazon Athena (SQL against the files themselves, serverless, billed by data scanned), then Amazon QuickSight (the dashboard somebody actually looks at). Amazon Data Firehose receives the stream and lands it, buffered by size or time Amazon S3 the data lake — the files stay where they are AWS Glue catalogs what those files contain, and runs ETL over them Amazon Athena SQL against the files themselves, serverless, billed by data scanned Amazon QuickSight the dashboard somebody actually looks at
A question asked of data in S3, and the service that owns each step.

Athena asks once; Redshift answers every morning

Amazon Athena runs SQL directly against files already sitting in Amazon S3, with no cluster to create and no loading step, and bills by the amount of data each query scans. That pricing is the reason it is the right answer to a compliance question about a year of logs that will probably never be asked again: the cost of asking once is the cost of one scan, and the cost of not asking is nothing at all.

Amazon Redshift is the opposite economics and a genuinely different tool: a data warehouse with columnar storage, excellent when the same analytical questions are asked over data you have deliberately loaded, and a poor answer when the alternative is a single query. Amazon EMR runs the managed big-data frameworks such as Spark and Hadoop, for work SQL cannot express. AWS Glue is the catalog that tells Athena what the files contain, plus the ETL that reshapes them. Amazon QuickSight is the business intelligence layer that draws results from a source such as Athena or Redshift — it never reads raw files itself, and an option offering it as the query engine is testing the layers.

A stream you read, or a delivery you do not have to

Two streaming shapes are worth telling apart. Amazon Kinesis Data Streams keeps an ordered, replayable stream that you write your own consumers against, which is what you want for real-time processing or for several independent readers of the same events. Amazon Data Firehose — the delivery service previously named Kinesis Data Firehose — receives records, buffers them by size or by time, optionally converts or compresses them, and writes them to a destination such as S3, Redshift or OpenSearch, with nothing for you to run or scale.

The requirement that separates them is almost always phrased as work you do not want to do. "Capture these events into S3 within a minute or two, with no cluster and no consumer application to build" is Firehose in one sentence. A queue is the tempting neighbour and is wrong for the same reason: something still has to poll it, batch the messages and write the files, and that something is exactly the application the team said it would not build.

Reach for a pre-trained service first

Sort the pre-trained services by their input and most scenario questions answer themselves. Images and video go to Amazon Rekognition. Documents and scans go to Amazon Textract, which is the one that understands a form's structure and can turn a scan into key-value pairs rather than a wall of words. Text goes to Amazon Comprehend for analysis or Amazon Translate for languages. Speech goes to Amazon Transcribe on the way in and Amazon Polly on the way out. Conversations go to Amazon Lex, and enterprise search to Amazon Kendra.

Amazon SageMaker sits underneath all of them as the build-your-own option: the platform for building, training and deploying a model when nothing pre-trained fits. That makes it the wrong answer to a stem that says the team has no machine learning expertise and does not want to train anything, which is how such stems are usually written. The habit worth forming is the order — pre-trained service first, custom model only when the catalogue has no answer.

Three pre-trained services, sorted by what goes in. Amazon Rekognition — Feed it: Images and video; Get back: Objects, scenes, faces, moderation labels; The near miss: It can spot text in a picture, but not a form's structure. Amazon Textract — Feed it: Scanned documents and PDFs; Get back: Text, plus form fields and tables as key-value pairs; The near miss: Not a general image analyser. Amazon Comprehend — Feed it: Text you already have; Get back: Entities, key phrases, sentiment, language; The near miss: Something has to produce the text first Amazon Rekognition Amazon Textract Amazon Comprehend Feed it Images and video Scanned documents and PDFs Text you already have Get back Objects, scenes, faces, moderation labels Text, plus form fields and tables as key-value pairs Entities, key phrases, sentiment, language The near miss It can spot text in a picture, but not a form's structure Not a general image analyser Something has to produce the text first
Three pre-trained services, sorted by what goes in.

Worth carrying in

Amazon Athena
Serverless SQL over files in S3. Billed by data scanned. The question you ask once.
AWS Glue
The data catalog that says what those files contain, plus managed ETL.
Amazon Redshift
The warehouse. Load data in, then ask the same questions every morning.
Amazon EMR
Managed Spark, Hadoop and friends, for work SQL cannot express.
Amazon QuickSight
Dashboards and business intelligence on top of a source such as Athena or Redshift.
Amazon Kinesis Data Streams
An ordered, replayable stream you write your own consumers against.
Amazon Data Firehose
Managed delivery of a stream into S3, Redshift or OpenSearch. Nothing to run.
Amazon Rekognition
Images and video: objects, scenes, faces, moderation.
Amazon Textract
Documents and scans: text, form fields and tables.
Amazon Comprehend
Natural language on text you already have: entities, key phrases, sentiment.
Amazon Transcribe
Speech to text. Amazon Polly is text to speech.
Amazon Translate
Machine translation between languages.
Amazon Lex
Conversational interfaces — the chatbot and voice-bot service.
Amazon Kendra
Enterprise search across an organisation's own documents.
Amazon SageMaker
Build, train and deploy your own models. The answer when nothing pre-trained fits.

What the exam does with this

Objective
3. Cloud technology and services
Share of the exam
34% (the whole objective)
Questions in this lesson
3
Signed for by a person
0

Partly checked. None of the 3 questions here has been read against the cited source by a person. 3 questions have been checked against their cited clause by an automated pass — which is not the same thing, and is not a signature.

Only questions a person has signed for are used in mock exams here. That is the whole difference between the two kinds of checking above.

Questions in this lesson

Drill this lesson

A lesson is one sitting: the trainer draws a short run from these questions alone and spaces the ones you get wrong.

Practise Machine learning and analytics services

The rest of objective 3