CLOUD CONCEPT

Machine learning

Machine learning is a branch of artificial intelligence that uses data to train models to make predictions, recognize patterns, or generate outputs without explicitly programming every decision rule.

Cloud Concepts Hub →

What is Machine learning

Machine learning turns examples and experience into models that can handle tasks such as detecting suspicious transactions, classifying images, and understanding text. Cloud platforms provide scalable infrastructure and managed APIs for applying these models, but useful results still depend on appropriate data, evaluation, security, and ongoing monitoring.

Machine learning replaces some hand-written decision rules with patterns learned from data. Instead of programming every characteristic of an unwanted email, an engineer can train a model using examples of unwanted and legitimate messages. The resulting model estimates how a new message should be classified. Machine learning is part of artificial intelligence; deep learning is a subset of machine learning that uses multilayer neural networks. Generative AI commonly uses deep learning models to produce text, images, audio, or other content.

Training and inference are different activities. Training adjusts a model's parameters using data and an optimization process. Inference applies a trained model to new inputs, such as estimating delivery time for an order. A model does not necessarily keep learning when an application sends it requests. Updating its behavior generally requires a separate training, fine-tuning, or model-replacement process.

Different learning approaches suit different problems. Supervised learning uses examples with known answers, such as historical transactions labeled fraudulent or legitimate. Unsupervised learning finds structure in data without those target labels, such as grouping customers by purchasing behavior. Reinforcement learning learns action-selection behavior through rewards from interactions with an environment. Not every business problem needs machine learning: a deterministic rule is often simpler and more reliable when the required behavior is already well defined.

In the cloud, teams can rent compute for custom training, use managed model-development platforms, or call pretrained AI services through APIs. A custom demand-prediction model offers control over training data and evaluation but requires engineering and operational work. A managed document-extraction API can return text and form fields without requiring the application team to train its own recognition model. Managed infrastructure reduces server administration; it does not transfer responsibility for choosing an appropriate use case or validating results.

A practical workflow starts with defining a measurable objective, collecting authorized data, and preparing representative examples. Engineers separate training, validation, and test data so that evaluation measures performance on examples not used to fit the model. Data leakage, such as including information that would not exist when a real prediction is made, can create misleadingly high scores. Accuracy alone can also be misleading: a fraud model that labels every transaction legitimate may appear accurate when fraud is rare. Precision, recall, and the business cost of mistakes are often more useful.

Cloud deployment introduces trade-offs among latency, throughput, cost, and control. Real-time inference supports interactive applications but may incur charges for provisioned resources even during quiet periods. Batch inference is useful when results can wait, such as scoring a customer dataset overnight. Training costs depend on compute type, runtime, and experimentation, while API-based services commonly charge by usage units. Sensitive training data and inference inputs require access controls, encryption, and review of service-specific retention and data-use terms.

Production models need monitoring because input data and real-world relationships can change. Track prediction quality where outcomes become available, investigate performance differences across relevant populations, and define review or fallback paths for consequential decisions. A confidence score is not a guarantee of correctness. For AWS exam scenarios, distinguish custom model development with Amazon SageMaker AI from ready-made capabilities such as image analysis with Amazon Rekognition, language analysis with Amazon Comprehend, and access to foundation models through Amazon Bedrock.

Key aspects of Machine learning

Effective machine learning combines suitable data, explicit evaluation, an appropriate deployment approach, and ongoing operational oversight.

Learning patterns rather than enumerating rules

Models learn relationships from examples instead of requiring every decision rule to be coded manually. Use this approach when patterns are complex and suitable data exists, rather than replacing simple deterministic logic unnecessarily.

Training and inference are separate

Training creates or updates a model; inference uses that model to process new inputs. Plan their compute, deployment, and cost requirements separately, and do not assume inference requests automatically retrain the model.

Data quality and generalization

Representative data and evaluation on held-out examples help determine whether a model works beyond its training dataset. Prevent data leakage and check for missing values, inconsistent labels, and underrepresented cases.

Managed APIs versus custom models

Pretrained AI APIs provide capabilities such as transcription or image analysis without building a model from scratch. Custom models provide greater control but require more work on preparation, evaluation, deployment, and maintenance.

Measured uncertainty and business impact

Predictions can be wrong even when a model reports high confidence. Select metrics and decision thresholds according to the consequences of false positives and false negatives, with human review where appropriate.

Continuous operational oversight

Monitor model quality, changing inputs, latency, security, and spending after deployment. Define when to investigate, retrain, replace, or roll back a model rather than assuming its initial performance will persist.

Cloud services for Machine learning

Choose services according to the input and required output rather than treating all AI services as interchangeable. Amazon Transcribe converts speech to text, Amazon Textract extracts document information, and Amazon Rekognition analyzes visual content. Amazon Comprehend can analyze resulting text for entities or sentiment. Amazon Bedrock supports generative tasks such as drafting summaries from extracted information, subject to validation. Amazon SageMaker AI supports custom models when task-specific APIs do not meet requirements. Applications can combine these capabilities while enforcing permissions, protecting sensitive inputs, monitoring costs, and checking output quality.

Amazon Bedrock

Provides managed access to foundation models for generative AI applications. Teams can use pretrained models without training a foundation model from scratch, while still evaluating output quality, safety, latency, and cost.

Open Amazon Bedrock →
Amazon Rekognition image Amazon Rekognition

Applies machine learning to image and video analysis, including detecting objects and identifying potentially inappropriate content. Applications can call its APIs instead of developing their own computer vision models.

Open Amazon Rekognition →
Amazon Comprehend image Amazon Comprehend

Uses natural language processing to analyze text for information such as entities, key phrases, and sentiment. It suits tasks such as routing customer feedback or extracting signals from document collections.

Open Amazon Comprehend →
Amazon Transcribe image Amazon Transcribe

Uses machine learning to convert speech into text. Applications can use transcripts for accessibility, search, or downstream text analysis, while accounting for errors caused by noise, accents, and specialized vocabulary.

Open Amazon Transcribe →
Amazon Textract image Amazon Textract

Extracts text and structured information, including forms and tables, from supported documents. It helps automate document processing, with validation or human review for uncertain or business-critical fields.

Open Amazon Textract →