AWS Certified Machine Learning Engineer - Associate (MLA-C02) Course

Course scope
The course follows the official MLA-C02 exam guide and covers all 4 domains and 12 tasks. Open a domain to see its lessons.
Amazon S3 and Amazon EFS: object storage versus shared files: How object API access differs from shared filesystem access, and which application requirements favor each service.
Amazon S3 stores objects in buckets. An application identifies an object by its bucket and key, then uses API requests such as GetObject and PutObject, usually through an SDK. This lesson uses S3 general purpose buckets: a key such as datasets/train.csv is an object name, not a file inside a real directory hierarchy.
Amazon EBS and Amazon EFS: block storage versus shared files: How EBS block-device access differs from EFS shared-filesystem access when making datasets available to compute workloads.
A dataset reader might open /data/train.csv with ordinary file operations on either service. The important difference is what the operating system accesses underneath that path: an EBS block device or an EFS shared file system.
Amazon S3: retrieving datasets through object APIs: How object keys, listing, and parallel or ranged reads let applications locate and efficiently extract datasets from S3.
An S3 dataset often consists of many objects, such as CSV files, images, or Parquet files. An application retrieves each object by specifying its bucket and exact object key. In s3://training-data/events/day=2026-01-01/part-000.parquet, the bucket is training-data and the key is events/day=2026-01-01/part-000.parquet.
Amazon EBS: accessing volume data from EC2: How to attach a data volume to an EC2 instance in the same Availability Zone and mount its existing filesystem safely so applications can read source data.
An Amazon EBS volume gives an EC2 instance a block device, like an additional disk. To read files already stored on that disk, you first attach the volume in AWS, then mount its existing filesystem inside the operating system. This lesson uses Linux.
Amazon EFS: mounting and reading shared files: How clients use mount targets, network access, and file permissions to mount EFS over NFS and read datasets through ordinary file operations.
Amazon EFS provides a shared file system that Linux clients access using NFS. Mounting connects that remote file system to a local directory, such as /mnt/datasets. Applications then use paths beneath that directory rather than making storage API calls.
Amazon RDS and Amazon DynamoDB: relational and NoSQL data access: How relational schemas and SQL access in RDS differ from DynamoDB's key-based document access when choosing a source for data pipelines.
Amazon RDS manages relational database engines. A relational schema defines tables, columns, data types, and constraints. For example, an orders table can hold a customer identifier that relates each order to a row in customers. A pipeline can use these relationships to combine records rather than expect every order to contain the complete customer profile.
Amazon RDS: reading relational data for ML pipelines: How pipelines connect securely to RDS and extract relational records through filtered, batched SQL reads without overloading the source database.
An ML extraction job reads RDS tables through the database engine's SQL connection, using its endpoint, port, database name, and an engine-compatible driver such as a JDBC driver. Permission to call RDS management APIs does not grant permission to read table rows.
Amazon DynamoDB: reading and exporting table data: How to extract DynamoDB data using key-based reads, paginated queries and scans, or point-in-time exports to Amazon S3.
Choose a DynamoDB read operation from the keys you know. GetItem retrieves one item using its complete primary key: the partition key and, when present, the sort key. Query retrieves items with one partition-key value and can narrow them with a sort-key condition. For example, query one customer's orders within a date range when customer ID is the partition key and order date is the sort key.
Amazon FSx and Amazon EFS: choosing shared file storage: How FSx's specialized file systems differ from EFS's elastic NFS storage in compatibility, performance characteristics, and workload suitability.
Amazon EFS provides shared file storage over NFS for Linux-based workloads. Multiple clients can work with the same directories and files using ordinary file operations and POSIX permissions. Its storage capacity grows and shrinks as files are added and removed, without you provisioning a storage size.
Amazon FSx: provisioning file storage for ML datasets: How to select and configure an FSx file system for ML datasets, matching file-system compatibility, performance, cost, and data protection requirements.
Amazon FSx is a family of managed file systems, not one interchangeable storage service. Start with the protocol, client operating system, and file-system features your data loaders require. A fast file system is not useful if the application cannot mount it correctly.
Amazon S3: vector buckets and indexes: How vector buckets, index dimensions, distance metrics, and metadata filters determine how embeddings are stored and queried.
An embedding is a list of numbers that represents content, such as a document passage. An embedding model produces these numbers so that related content can be found by comparing vectors. Amazon S3 Vectors stores embeddings and supports similarity queries; it does not generate the embeddings for you.
Data Residency: geographic boundaries for storage: How to translate residency requirements into approved AWS storage locations and keep primary data, replicas, backups, logs, and downstream copies within those boundaries.
Data residency describes where data is stored geographically. Start with the requirement owner: identify the covered data classes, the permitted geography, and whether the rule also covers processing, logs, backups, and derived data. Do not assume that every privacy rule requires local storage or that encryption permits storage elsewhere.
Data Retention vs Storage Tiering: Why changing where data is stored to balance cost and access performance does not determine how long it must be kept or when it is deleted.
Data retention determines how long data must be kept and when disposal is required or permitted. Storage tiering determines where that data is stored to balance cost and access performance. A change to one does not automatically change the other.
Amazon S3: Object Lock retention: How retention modes and legal holds protect object versions from deletion or replacement to meet immutable-storage requirements.
S3 Object Lock provides write-once-read-many protection for individual object versions. Use it when records, training datasets, or other evidence must remain unchanged and cannot be permanently deleted during a required period. Object Lock requires S3 Versioning. Once Object Lock is enabled on a bucket, you cannot disable it or suspend versioning.
Storage tiering: choosing tiers and transition policies: How access patterns, retrieval deadlines, retention constraints, and total cost guide storage tier selection and age-based or access-based transitions.
Storage tiering matches data to a storage class using both how often it is read and how quickly it must be available. Separate data into useful groups: active training datasets, occasionally reused model artifacts, and rarely retrieved historical records can have different needs. Measure access frequency and the amount retrieved; an occasional full-dataset read can matter more than many small reads.
Amazon S3: storage classes and lifecycle transitions: How storage classes and lifecycle transitions balance storage cost, retrieval latency, access charges, and Availability Zone resilience.
An S3 storage class applies to an object, so one general purpose bucket can hold objects in different classes. Choose using access frequency, acceptable retrieval delay, and resilience—not storage price alone. S3 Standard suits frequent access: it provides millisecond reads without a per-GB retrieval charge, although request and applicable data-transfer charges still apply.
Price-Performance Ratio: storage cost per useful workload outcome: How to compare total storage cost per unit of useful workload performance under representative access patterns, considering only configurations that meet data structure, latency, and compliance requirements.
Storage price-performance compares total cost with the useful work storage enables. The lowest price per stored gigabyte is not necessarily the lowest cost per completed data-processing batch. First apply eligibility requirements; only then compare cost efficiency.
Throughput: sustained pipeline capacity: How to compare required and achieved completion rates in consistent units to detect capacity shortfalls and calculate whether a backlog will grow or drain.
Throughput is completed work divided by elapsed time. For a data pipeline, choose a clear completion boundary, such as records successfully committed to destination storage. Count useful completions, not submission attempts or retries.
Horizontal Scaling: ingestion throughput and bottlenecks: How distributing ingestion work across workers or partitions increases throughput, and how skew or shared storage limits can prevent additional resources from helping.
Ingestion throughput is the amount of data successfully ingested per unit of time. Horizontal scaling increases processing capacity by adding workers, rather than making one worker larger. The extra workers help only when they can process different pieces of work at the same time.
Elasticity vs. horizontal scaling: Why changing the number of workers does not necessarily mean capacity follows demand or is released when demand falls.
Horizontal scaling changes the number of workers serving a workload. Adding workers is scale-out; removing them is scale-in. A worker might be an EC2 instance or a container running GPU inference code. The term describes what changes, not why it changes.
Capacity Planning: sizing data ingestion pipelines: How peak arrival rates, data retention, and measured processing capacity determine storage and throughput requirements, quota needs, and headroom to prevent growing backlogs.
Capacity planning starts with how much data arrives, how long it must remain available, and how much processing delay is acceptable. Measure normal arrivals, short peaks, and peak duration. A daily average can hide a burst that overwhelms ingestion.
Amazon CloudWatch: metric statistics and dashboards: How dimensions, aggregation periods, statistics, and metric math turn service metrics into useful dashboard views and scaling signals.
A CloudWatch metric is a time series of measurements. Within an account and Region, its identity includes its namespace, metric name, and complete set of dimensions. A namespace identifies the source, such as AWS/EC2; dimensions are name-value pairs that identify the resource or population being measured.
Amazon CloudWatch: centralized log analysis: How log collection, retention, access controls, and Logs Insights queries support investigation of application failures and security-relevant activity.
CloudWatch Logs centralizes application and system log events so an investigation does not depend on reaching the original host. For an application on Amazon EC2, configure the CloudWatch agent to collect the relevant log files and send them to CloudWatch Logs. EC2 monitoring alone does not collect arbitrary application log files.
Amazon CloudWatch: alarm evaluation and actions: How thresholds, anomaly detection, evaluation windows, and missing-data settings determine alarm states and trigger notifications or automated responses.
A CloudWatch metric alarm evaluates a metric statistic against a condition. A static threshold is a fixed boundary, such as average inference latency greater than 500 milliseconds. Choose the comparison direction deliberately: high latency is bad, while low successful-processing throughput may be bad.
Amazon Kinesis Data Streams: throughput and scaling: How partition keys, shard limits, and capacity modes determine stream throughput, and how metrics reveal hot shards, throttling, and consumer lag so capacity can be adjusted.
Amazon Kinesis Data Streams divides a stream into shards. Each shard has write limits for both bytes and records, plus read throughput and request limits. Either write limit can become the bottleneck: many small records can exhaust record capacity, while fewer large records can exhaust byte capacity.
Event Streaming: independent consumption of retained events: How a retained event log decouples producers from independent consumers, allowing ingestion pipelines to process incoming data continuously and replay history without changing producers.
An event records something that happened, such as a payment completing or a sensor reporting a temperature. A producer publishes events continuously to a retained log instead of sending separate requests to every application that needs them.
Amazon Kinesis Data Firehose: managed streaming delivery: How a Firehose delivery stream accepts records from producers or supported sources and uses buffering, retries, and destination configuration to deliver them to storage and analytics services.
Amazon Data Firehose, formerly Amazon Kinesis Data Firehose, manages delivery of streaming records to a configured destination. You create a delivery stream, select its source and destination, and grant the permissions it needs. Firehose operates the delivery infrastructure.
Amazon Kinesis Data Firehose vs Amazon Kinesis Data Streams: When to choose managed delivery to a destination rather than a retained stream with independent consumers and replay.
Amazon Kinesis Data Firehose, now named Amazon Data Firehose, is a managed delivery service. Choose it when the main job is to move incoming records to a supported destination, such as Amazon S3, without writing a delivery application. You configure the destination; Firehose handles buffering and delivery retries.
Amazon MSK: ingesting data through Kafka topics: How producers and consumers use partitioned Kafka topics, retention, and offsets in Amazon MSK to ingest and replay streaming records.
Amazon MSK runs managed Apache Kafka clusters. A producer publishes records to a named topic, and consumers read those records using Kafka clients. Your applications still choose the topics, record keys, and processing behavior.
Amazon MSK vs. Amazon Kinesis Data Streams: How Kafka compatibility, application ecosystem, and capacity management distinguish Amazon MSK from Amazon Kinesis Data Streams when choosing a streaming ingestion service.
Amazon MSK and Amazon Kinesis Data Streams both ingest and retain streaming records so applications can read them independently and replay retained data. Either can supply events to analytics or machine learning pipelines. Their biggest difference is the interface applications use, not whether they support real-time ingestion.
Amazon Managed Service for Apache Flink: consuming streaming sources: How Flink applications use source connectors, access permissions, and starting positions to consume records from Kinesis Data Streams and Kafka.
A source connector is the application code that reads an external stream and introduces its records into Flink. Use a Kinesis connector for Kinesis Data Streams and a Kafka connector for Kafka topics, including topics hosted on Amazon MSK. Include connector dependencies compatible with the application's Flink runtime.
Amazon Managed Service for Apache Flink vs Amazon Kinesis Data Streams: How managed stream computation differs from durable stream ingestion and storage, and why a pipeline can need both services.
Amazon Kinesis Data Streams accepts records from producers and durably retains them for a configured retention period. Consumers read those records to do useful work. Reading a record does not remove it, so separate consumers can process the same input independently.
Amazon Kinesis Video Streams: ingesting and retaining device media: How producer SDKs ingest timestamped audio and video fragments into streams with configurable retention for retrieval by ML consumers.
Amazon Kinesis Video Streams ingests, stores, and serves timestamped media from devices. A producer sends audio or video, while a separate consumer retrieves it for processing. The service manages the media stream; it does not run your ML model.
Comma-Separated Values: reliable flat-file exchange: How CSV’s flat, untyped records shape parsing and schema agreements for reliable ingestion and export, and why the format suits sequential access better than selective analytical queries.
Comma-Separated Values (CSV) represents a table as a sequence of records, each containing fields in an agreed order. It is a flat format: it has no native structure for nested objects or lists. An optional header names the columns, but does not declare their types.
JSON: record formats for data pipelines: How JSON structure and JSON Lines framing shape reliable record ingestion and writing, and why JSON suits whole-record access better than repeated column-selective analysis.
JSON is a text format for exchanging and storing data. An object contains name-value pairs with double-quoted names; an array contains an ordered sequence. For example, {"customer_id":"c42","purchase_total":29.95,"items":["book","pen"]} combines strings, a number, and a nested array. Values can also be objects, booleans, or null. Array order matters; object member order should not carry business meaning.
Columnar Storage: formats for analytical access: How column-oriented layouts make Parquet and ORC efficient for analytical reads, and when to convert incoming CSV or JSON into these formats.
Columnar storage groups values by field rather than keeping every record's fields together. In CSV, an order's identifier, region, amount, and description appear together on a row. JSON also commonly carries fields together in individual records. An analytical query that totals amounts by region needs only a few of those fields, but a text reader generally must scan and parse the records.
Apache Parquet: columnar files for analytical access: How Parquet's typed columnar layout and write settings support selective analytical reads and guide its use in data preparation.
Apache Parquet is a file format, not a database, query engine, or storage service. It stores data and schema information inside files that different processing tools can read. Its typed schema distinguishes values such as integers, strings, decimals, and timestamps, rather than leaving every value as untyped text.
ORC File Format: layout for analytical access: How ORC's typed column streams, stripes, and statistics shape efficient reading and writing for repeated analytical workloads.
ORC is a schema-aware, columnar file format for repeated analytical reads. Its schema records types such as integers, decimals, timestamps, strings, and nested structures. A compatible reader interprets these types without inferring each value from text.
Apache Parquet vs ORC File Format: How engine compatibility, interoperability requirements, and measured workload performance distinguish the choice between Parquet and ORC.
Apache Parquet and ORC are open, typed columnar file formats for analytical work. Both support reading selected columns, compression, and metadata-based skipping in compatible readers. Neither is a query engine, storage service, or table transaction system, so these shared capabilities do not establish a universal winner.
Amazon Athena: S3 data formats for SQL analytics: How Athena reads CSV, JSON, Parquet, and ORC through table definitions and writes query results into analytics-ready S3 datasets using CTAS and INSERT INTO, with format choices driven by access patterns and scan costs.
Amazon Athena runs SQL against files in Amazon S3 without loading them into a database first. For the external S3 tables in this lesson, a table definition in the AWS Glue Data Catalog describes columns, data types, the S3 location, and how to interpret the files.
Joins: matching records across datasets: How compatible keys, join types, and key cardinality determine which records survive a merge and when rows multiply.
A join combines related rows from two datasets using a matching condition. For example, joining orders to customers on customer_id adds customer attributes to each matching order. Unlike a union, which appends rows, a join matches records and combines their columns.
Data Deduplication: rules for removing redundant records: How to use dataset grain, exact-row comparisons, and business keys with deterministic survivor rules to remove duplicates from merged datasets without discarding legitimate repeated observations.
Data deduplication removes redundant records, not simply repeated values. Start by defining the dataset's grain: what one row represents. For a current order-line snapshot, the grain might be one row per (order_id, line_no). A customer ID alone is too broad because one customer can place several orders, each with several lines.
AWS Glue: Spark ETL transformations: How Glue Spark jobs use DynamicFrames and DataFrames to join source datasets, resolve schema differences, and transform data for output.
An AWS Glue Spark job reads datasets, transforms distributed records, and writes the result. Within the job, you can use Glue DynamicFrames, Spark DataFrames, or both. They are representations of data inside the job—not separate processing services.
Amazon EMR: data transformation with Apache Spark: How Spark jobs on EMR use DataFrame transformations to turn raw data into feature datasets for machine learning.
Amazon EMR runs Apache Spark jobs that process data across multiple workers. A Spark DataFrame represents distributed rows with named, typed columns. You describe operations on those columns rather than writing a loop over every record.
Broadcast Joins: small-input replication in Spark: How replicating a small join input avoids shuffling the larger input, and how to select and verify this strategy using input sizes, worker memory, and Spark execution plans.
A join needs matching keys to meet. A shuffle join can repartition both inputs by the join key, moving rows between workers. A broadcast join instead replicates one input to the participating executors, the Spark processes that run tasks. Each executor can then join its existing partitions of the other input locally.
Vector Search: vector index configuration: How to configure and maintain compatible vector indexes while monitoring the storage, ingestion, and query costs that determine their capacity needs.
A vector index organizes stored embeddings for similarity search. Configure it for the output of your embedding model: the vector’s dimension, its supported data type, and the similarity measure recommended for that model. For example, an index expecting a different number of values cannot accept the model’s vectors.
Approximate Nearest Neighbor Search: configuring indexes at scale: How to choose and tune ANN indexes for a vector workload, using exact-search benchmarks to balance recall, latency, and memory as data volume grows.
Approximate nearest neighbor search reduces search work by accepting that it may miss true nearest neighbors. Start with an exact-search benchmark: for representative queries, save the exact top-k vector IDs from a fixed dataset. Use the same embedding model, preprocessing, distance measure, and metadata filters for exact and approximate searches. Matching vector dimensions alone does not make different embedding models compatible.
Amazon RDS: vector search with PostgreSQL and pgvector: How RDS for PostgreSQL stores and searches embeddings with pgvector, using vector indexes and database capacity to meet workload requirements.
Amazon RDS for PostgreSQL can store and search embeddings using the pgvector extension. An embedding is a list of numbers that represents content for similarity comparisons. An embedding model generates these numbers outside the database; pgvector stores them and calculates distances between them.
Amazon OpenSearch Service: scalable vector storage: How to configure vector indexes and choose managed-domain or Serverless capacity to meet embedding dimensions, similarity search, and workload scaling requirements.
A vector index stores embeddings alongside document text, identifiers, and metadata. Map the embedding field as knn_vector, with its dimension equal to the number of values your embedding model produces. A model that returns 768 values needs dimension: 768. Stored and query vectors must use compatible embedding models and preprocessing; matching dimensions alone does not make different models compatible.
Amazon Aurora vs Amazon OpenSearch Service: choosing a RAG vector store: When relational data integration favors Aurora PostgreSQL and when search-centric retrieval requirements favor OpenSearch Service.
In Retrieval Augmented Generation (RAG), a retriever finds relevant content and supplies it as context to a language model. A vector store holds embeddings, numerical representations used to find content with similar meaning. Both Aurora PostgreSQL and Amazon OpenSearch Service support vector retrieval. The choice depends on what retrieval must do alongside similarity search.
Structured Data: preserving record schemas during ingestion: How field definitions, data types, and validation preserve consistent records when ingesting tabular datasets into database or object storage.
A schema is the contract that each ingested record must follow. It defines field names, meanings, data types, and rules such as whether a value is required. Define this contract before accepting a tabular dataset, rather than assuming that the first few rows describe every possible value.
Semi-Structured Data: preserving flexible records during ingestion: How to ingest and retain nested records with optional fields while preserving metadata, labels, and references to AI and ML source content.
A semi-structured record can contain nested objects, arrays, and optional fields. For example, {"id":"clip-7","metadata":{"language":"en"},"labels":["speech"]} keeps metadata together and represents labels as a list. Preserve those relationships during ingestion rather than turning every field into a string.
Unstructured Data: storing source files and metadata: How to preserve text, image, and audio content in object storage with linked metadata so downstream AI pipelines can identify and interpret each file.
Preserve text, images, and audio as original files in Amazon S3. An S3 object stores the file's bytes in a bucket under an object key. Keys such as sources/a17/call.wav organize objects; their prefixes are not filesystem directories.
Structured Data vs Unstructured Data: records and their content: How schema-defined records differ from free-form content, and why storing text or media references in table columns does not make the underlying content structured.
Structured data follows an explicit, consistent schema: named fields with defined meanings and data types. In a customer table, each row represents a customer, while fields such as customer_id, registration_date, and balance describe that customer. Applications can compare balances or filter dates using those definitions.
Semi-Structured Data vs Unstructured Data: How field-based records differ from free-form content, and why wrapping text or media references in JSON does not change the underlying content's data type.
Semi-structured data uses named fields, tags, or nested elements to organize records without requiring a uniform relational table. For example, JSON purchase events can contain identifiers, nested customer details, and arrays of items. One event can have a coupon field while another omits it. Flexible fields still have meanings and expected types.
Metadata Schemas: consistent descriptive attributes across data types: How to define and validate a shared metadata contract for text, images, and audio using consistent attribute meanings, types, required fields, and controlled values during ingestion.
A metadata schema is a contract for the attributes that describe a resource. It defines each field's meaning, type, requiredness, and allowed values. Text, images, and audio can share this contract even though their content has different formats.
AWS DataSync: file and object transfer tasks: How to configure DataSync tasks to securely transfer and verify dataset files and objects from source storage into AWS storage.
AWS DataSync copies files and objects between supported storage locations. It moves dataset contents such as text, images, and audio without parsing or transforming them. A location describes a storage endpoint; a task connects a source location to a destination location and defines how to copy.
Amazon SageMaker: Feature Store ingestion: How feature group schemas, record identifiers, event times, and ingestion APIs control writes to online and offline feature stores.
Amazon SageMaker Feature Store stores named features, such as a customer's purchase count. A feature group defines the features that belong together, their data types, and the stores used to hold their records. Before ingestion, define the schema using String, Integral, or Fractional feature types. Incoming feature names and values must match those definitions.
Amazon SageMaker Data Wrangler: cleaning data with transformation flows: How to use and verify cleaning transformations in a Data Wrangler flow to handle outliers, impute missing values, and remove duplicate rows.
A Data Wrangler flow records the transformations that turn imported data into prepared data. Select the node you want to clean and add transformations from there. Each transformation uses the output of the steps before it, so changing an earlier step can change later results.
AWS Glue DataBrew: reusable preparation recipes: How to build cleaning and transformation recipes on representative samples, publish versions, and execute them as repeatable batch jobs.
AWS Glue DataBrew separates interactive preparation from batch execution. A dataset identifies an input source and its format or connection settings. A project opens a sample of that dataset in a visual workspace. As you apply transformations, DataBrew records them as ordered steps in a recipe.
Amazon SageMaker Data Wrangler vs AWS Glue DataBrew: choosing a visual preparation tool: How Data Wrangler's integration with SageMaker ML workflows differs from DataBrew's recipe-based data preparation, and when to choose each.
Amazon SageMaker Data Wrangler and AWS Glue DataBrew both provide visual data preparation. Both can help handle missing values, remove duplicate rows, and transform columns. A requirement such as “clean this dataset without writing extensive code” does not, by itself, distinguish them.
Amazon EMR vs AWS Glue: choosing a Spark processing service: How EMR's control over Spark runtimes and compute differs from AWS Glue's managed ETL environment when choosing where to run data transformations.
Amazon EMR and AWS Glue can both run Apache Spark transformations that combine sources, clean records, and write prepared datasets. A join or aggregation alone rarely decides between them. The important difference is how much control the job needs over its runtime: the Spark version, libraries, configuration, and surrounding software.
AWS Glue DataBrew versus AWS Glue: choosing a preparation tool: When DataBrew's visual recipe and profiling workflow fits better than AWS Glue ETL and Data Quality capabilities.
AWS Glue DataBrew fits visual, batch-oriented data preparation. An analyst or engineer can inspect data, preview cleaning operations, and save those operations as a reusable recipe. Choose it when its built-in transformations cover the work and the team benefits from seeing how changes affect the data.
Point-in-Time Joins: Reconstructing Historical Features: How to join training examples to SageMaker Feature Store history so each receives the latest feature version eligible by event time and availability at its prediction cutoff.
A point-in-time join reconstructs the features a model could have used for a historical prediction. Each training example needs an entity identifier, a unique example identifier, and a prediction cutoff. The cutoff is the time the prediction was made, not the later time when its outcome became known.
Training-Serving Skew: feature consistency across training and inference: How shared, versioned feature definitions and parity checks keep historical training features and online inference values consistent with the information available at prediction time.
Training-serving skew occurs when training inputs do not faithfully represent the inputs available during inference. Matching column names and data types is not enough: a purchase count over a calendar day differs from a count over the preceding 24 hours.
AWS Lambda: streaming record transformations: How Lambda processes streaming record batches, returns transformed records, and handles retries without duplicating processing effects.
AWS Lambda can transform streaming records in batches. In this pipeline, Amazon Data Firehose buffers incoming records and invokes Lambda synchronously with several records in one event. Your handler must process the records in that event, rather than assume each invocation contains just one. Buffering settings balance waiting time against work per invocation.
Idempotency: retry-safe streaming transformations: How stable event keys, atomic duplicate tracking, and retry-safe output writes prevent replayed streaming records from producing duplicate effects.
A streaming record can reach transformation code more than once, including when processing succeeds but its success is not recorded before a failure. Idempotency means that repeating the same logical event does not produce another intended effect. The code may execute again; the output must not become another independent result.
Event-Time Processing: windows and late-arriving data: How timestamp-based windows use watermarks and lateness policies to produce streaming features when records arrive out of order.
Event time is when an event occurred. Ingestion time is when an ingestion system received it, and processing time is when the application handled it. A purchase made at 10:02 but processed at 10:08 belongs to the 10:00–10:05 event-time window, not the 10:05–10:10 window.
Windowed Aggregation: building streaming features: How to compute per-entity streaming features using window definitions, aggregate state, and late-event rules that determine which events contribute to each result.
A windowed feature summarizes events for one entity over a bounded period: purchases per account, requests per device, or average temperature per sensor. Define the entity key, timestamp field, window, and aggregate together. Use event time to describe when activity happened; processing time describes when the system handled it. A purchase made at 10:02 but processed at 10:07 belongs to the earlier interval under event-time windowing.
Feature Engineering: numeric scaling: How scaling, standardization, and normalization change numeric inputs, with transformation parameters fitted on training data and reused consistently.
Numeric scaling changes the size of numeric inputs without changing what they measure. A distance-based model can otherwise give income more influence than age simply because income has larger numbers. Scaling is often useful for distance-based methods, regularized linear models, and neural networks; tree-based models generally do not require it.
Min-Max Scaling: fitting and applying feature ranges: How training-set minima and maxima define reusable feature-range transformations, including their suitability for different models and their behavior with outliers and unseen values.
Min-max scaling transforms each numeric feature independently using reference minimum and maximum values. For a target range from a to b, the rule is x_scaled = a + ((x - x_min) / (x_max - x_min)) * (b - a). The reference minimum maps to a, and the reference maximum maps to b.
Feature Engineering: reshaping feature representations: How binning, log transformations, and feature splitting expose useful patterns by changing how raw attributes are represented.
Feature engineering changes how an input represents a problem. For example, subscription length can remain an exact number of days or become a membership band. Binning replaces numeric values with the ranges they belong to. A bin defined as 10 <= x < 20 gives 12 and 18 the same representation. This can expose threshold effects when broad ranges matter more than small differences.
Binning: defining and applying numerical intervals: How to choose and encode equal-width, quantile, or domain-defined bins, fit boundaries without data leakage, and apply them consistently during training and inference.
Binning replaces a numerical value with membership in an interval. Account ages of 8 and 20 days might both become “7 to below 30 days.” This represents range-based patterns but discards differences within each interval. Unlike scaling, binning does not preserve continuous variation.
Tokenization versus embeddings: How splitting text into model token IDs differs from representing text as vectors, and why token usage and embedding computation are different measurements.
Tokenization splits text into units called tokens and maps each unit to an integer token ID in a vocabulary. The result is a sequence of IDs that a model can process. A token can be a word, part of a word, punctuation, or another text unit; it is not necessarily a whole word.
Embeddings: generating compatible representations: How to configure text and image embedding models, prepare supported inputs, and preserve encoder compatibility across indexed content and queries.
An embedding model converts a supported input into a vector of numbers. Choose the model by its supported input types, languages, and intended use—not simply because it returns a vector. In Amazon Bedrock, you select an embedding model through its model ID; a text-generation model is not a substitute.
Cosine Similarity: comparing embedding directions: How cosine similarity measures directional agreement between compatible text or image embeddings, including normalization, score interpretation, and why equal dimensions alone do not make embeddings comparable.
An embedding represents text or an image as a numerical vector. An embedding model produces that representation; cosine similarity compares the directions of two representations. Related directions can indicate related content when the model was trained for the intended task.
Embeddings: retrieval architecture for RAG: How embedding capabilities and limitations guide the choice of dense, hybrid, or multimodal retrieval for RAG and the configuration of compatible document and query embeddings in knowledge bases.
Dense retrieval compares a query embedding with stored passage embeddings. It is useful when questions and documents express similar meanings with different words: “recover account access” can match “reset a forgotten password.” Similarity is a ranking signal, not proof that a passage answers the question.
Embeddings: optimizing quality and efficiency: How to evaluate embedding models with representative retrieval queries and tune model choice, dimensions, and recomputation policies using measured relevance, latency, and embedding computation costs.
An embedding model is useful when it retrieves content people need. Build a representative query set from real search needs, including common requests, domain terms, supported languages, and difficult wording. Have reviewers identify relevant passages in a fixed document collection. Keep a held-out evaluation set separate from queries used while tuning.
Tokenization: model-matched text preprocessing: How tokenizer vocabularies and segmentation rules turn text into token IDs, and why preprocessing must use the tokenizer expected by the model.
A tokenizer converts text into a sequence of numerical token IDs. Two parts work together: segmentation rules determine how to split the text, and a vocabulary maps the resulting pieces to IDs. An ID identifies a vocabulary entry; its numerical value does not express the meaning of the text.
Lemmatization: context-aware word normalization: How to normalize inflected words using language and grammatical context, and evaluate whether the resulting text features preserve the distinctions a model needs.
Lemmatization maps an inflected word to its dictionary form, called a lemma. For example, cars becomes car, and the past-tense verb went can become go. It uses language-specific vocabulary, grammatical rules, or trained models rather than simply removing letters.
Data Augmentation: label-preserving text variations: How to create domain-specific text variations through paraphrasing, back-translation, and controlled generation without changing label-defining meaning.
Label-preserving augmentation creates new ways to express an example without changing the meaning that determines its label. For a billing-support classifier, “Invoice INV-42 was charged twice. Do not cancel my plan” can carry the label duplicate_charge. “I was charged twice for INV-42; please keep my plan active” expresses the same request differently.
Amazon Translate: translation-based text augmentation: How back-translation creates variants of training text, using custom terminology to preserve domain terms and checking that meaning is retained.
Back-translation creates candidate training examples by translating text into an intermediate language and then translating that result back into the original language. Amazon Translate performs the translations; your application connects the two calls. The round trip can change wording while keeping the intended meaning.
Amazon Textract: extracting document text and structure: How Textract extracts printed and handwritten text, form fields, and tables, and how to choose an extraction API and interpret its structured results.
Amazon Textract extracts printed and handwritten text from document images and scans without requiring you to train an OCR model. Optical character recognition (OCR) turns the marks on a page into machine-readable text. Clear, readable input matters: blur, poor contrast, and difficult handwriting can reduce accuracy.
Retrieval-Augmented Generation: source corpus preparation: How to turn extracted documents into a reliable RAG source corpus by normalizing content and removing boilerplate, duplicates, and superseded sources before chunking.
A RAG source corpus is the collection of documents approved to supply evidence for answers. Extracted text is not automatically ready for that job: broken words, repeated page furniture, and conflicting versions can all become retrieved passages. Prepare the corpus before chunking, rather than expecting smaller chunks to repair bad sources.
Document Chunking: designing retrievable passages: How to select and configure chunk boundaries for RAG ingestion, including Bedrock knowledge bases, while preserving context and source metadata and balancing retrieval quality, token limits, and cost.
Document chunking divides source content into passages that can be embedded, indexed, and retrieved for RAG. It is not summarization: preserve the source evidence rather than replace it with a shorter interpretation. Start with clean, correctly ordered text; scanned pages may need OCR and layout extraction before meaningful boundaries are available.
Metadata Extraction: preserving document context in RAG chunks: How to extract and validate structured document attributes, then preserve their provenance and document-level or chunk-level scope in indexed RAG records.
Metadata extraction turns document information into structured fields, such as document_id, revision, or effective_date. In retrieval augmented generation (RAG), these fields connect retrieved chunks to their source and support filtering, citations, and troubleshooting. An embedding captures semantic similarity; it does not replace explicit dates, versions, or identifiers.
Data Masking: sensitive fields in ML datasets: How to mask or redact sensitive fields during ML data preparation while preserving useful features and preventing original values from leaking into derived copies.
Data masking changes selected sensitive values while keeping useful context. For ML preparation, use static masking: create a modified dataset whose stored contents are suitable for downstream use. Hiding a value in a notebook display does not change the underlying dataset.
Data Anonymization: reducing re-identification risk: How redaction, generalization, and suppression reduce identification through direct identifiers and attribute linkage while preserving useful ML features.
Data anonymization aims to prevent information from being associated with an identifiable person while preserving value for an intended use. Start by separating two identification routes: direct identification and linkage through other attributes.
Data Masking vs. Data Anonymization: Why hiding sensitive values does not establish anonymity when remaining attributes or recoverable values still permit re-identification.
Data masking hides or replaces selected values so people can work with data without seeing information they do not need. For example, a support view can replace a customer's email address with asterisks while leaving transaction details visible. This limits disclosure of that field; it says nothing by itself about whether the customer can still be identified.
Pseudonymization: consistent identifier replacement: How tokens and keyed transformations preserve useful record relationships while keeping identifiers and re-identification information outside analytics and ML datasets.
Pseudonymization replaces a direct identifier with a substitute while keeping the information needed to connect it to an identity separately protected. If customer C104 becomes token t7, every transaction for that customer can carry t7 instead. Analysts can join purchases and calculate customer totals without receiving C104.
Data Anonymization vs. Pseudonymization: Why replacing identifiers with linkable substitutes does not provide the same protection as anonymization, even when lookup tables or keys are restricted.
Pseudonymization replaces an identifier with a substitute while preserving an association with a person. Replacing a customer's email address with customer_7Q can let analysts join that customer's purchases without seeing the email. A separately protected lookup table can connect the token back to the original identity.
Amazon Macie vs Amazon Comprehend: sensitive data discovery and text redaction: When to choose Macie for sensitive data discovery in S3 versus Comprehend for detecting and redacting personally identifiable information in text.
Amazon Macie answers a discovery question: which data in Amazon S3 contains sensitive information? It analyzes supported S3 objects and produces findings that help you locate and investigate sensitive data, including personally identifiable information (PII). A finding does not mask, redact, or rewrite the object.
Continued Pre-Training vs. Fine-Tuning: How continued pre-training on unlabeled documents differs from supervised fine-tuning on task examples in training objective and required data format.
Continued pre-training and supervised fine-tuning both adapt a pretrained model through additional training. The useful distinction is what the model is trained to predict and where the correct targets come from. Here, we compare them for generative language models.
Continued Pre-Training: preparing a domain corpus: How to turn domain documents into a reproducible training corpus through quality filtering, deduplication, sensitive-data removal, model-compatible formatting and tokenization, and leakage-free data splits.
A domain corpus is the collection of text used to continue training a model. For industrial maintenance, it might contain equipment manuals, inspection reports, and technical publications. Start with documents you have permission to use for training. Preserve an access-controlled, immutable source snapshot rather than repeatedly downloading whatever happens to be current.
Instruction Tuning vs. Fine-Tuning: Why instruction tuning is a specific form of fine-tuning rather than a synonym for every approach to adapting pretrained models.
Fine-tuning adapts a pretrained model through additional training on a targeted dataset. Training updates existing model parameters or trains additional adaptation parameters. The result is a learned adaptation that persists across requests, rather than information supplied only in a prompt.
Fine-Tuning: preparing task-specific training data: How representative input-output examples are cleaned, formatted, and split without leakage to support reliable model adaptation.
Task-specific fine-tuning learns from examples of an input and the output the model should produce. For a support classifier, the input might be a customer message and the target output an approved category. For a summarizer, the target is a reviewed summary—not simply whatever an agent originally wrote.
Model Distillation vs Fine-Tuning: How distillation identifies the source and purpose of a learning signal while fine-tuning identifies a training procedure, so training on teacher-generated examples can be both.
Model distillation identifies the source and purpose of a learning signal: a teacher model supplies signals so a student can learn selected teacher behavior. The student is typically smaller, with the aim of making that behavior less expensive to serve. It learns from the teacher rather than simply receiving a copy of the teacher’s parameters.
Model Distillation: preparing teacher–student training data: How representative application prompts become teacher-generated training examples through output generation, quality filtering, consistent formatting, and leakage-free dataset splitting.
For response-based model distillation, a teacher generates answers that become learning targets for a student. Each training example connects an application prompt to a desired response. The preparation work starts with representative prompts, not with generating as many answers as possible.
Data Profiling: interpreting dataset profiles: How to interpret completeness, uniqueness, distribution, and relationship metrics, account for sampling limits, and use the findings to propose data-quality checks.
A dataset profile summarizes the records examined. Start by identifying the row count, columns, filters, and time window. Completeness measures whether expected values are present. If 950 of 1,000 rows contain a non-null customer ID, non-null completeness is 95%. Check how the profiler treats empty strings, whitespace, and placeholders such as unknown: these can count as populated without providing useful information.
Schema Validation: enforcing data contracts: How to enforce explicit field, type, nullability, and value constraints on pipeline records and prompt-response pairs, and reject or quarantine failures at processing boundaries.
Schema validation checks each record against a declared contract. Specify allowed fields, required fields, types, nullability, and value constraints. Choose a schema format and validator that support the consuming system; different formats do not enforce identical rules.
Data Profiling vs. Schema Validation: discovery and conformance: How discovering observed data characteristics differs from checking declared structural expectations, and why schema conformance does not establish completeness or business validity.
Data profiling discovers observed characteristics of data. It measures what is present, such as observed types, missing values, distinct values, and numeric ranges. Schema validation compares data with declared structural expectations, such as field names, types, and nullability. Profiling produces observations; schema validation produces results against a contract.
Data Quality: rule-based dataset validation: How to turn ML data requirements into automated acceptance checks, interpret their results, and set thresholds for blocking, quarantining, or accepting data.
A useful data requirement names what a model needs and makes acceptance measurable. Replace “labels should be complete” with “every row in this training batch must have a non-null label.” Define the scope, the metric, and the acceptance threshold. Also name the owner who approves the requirement and the action taken on failure.
Data Quality vs Data Profiling: How describing a dataset's observed characteristics differs from deciding whether it meets requirements for a particular use.
Data profiling describes what is observed in a dataset. A profile might report that customer identifiers are populated in 98% of records, that a column contains three country-code formats, or that the newest record is from yesterday. These findings help you understand the data; they do not, by themselves, decide whether it is acceptable.
Schema Validation vs. Data Quality: Why satisfying a structural contract does not establish factual accuracy, label consistency, freedom from bias, or content safety, and where broader data quality checks are needed.
Schema validation checks data against a declared contract: required fields, types, allowed values, and other explicitly configured constraints. Data quality asks whether the data is fit for its intended use. Structural conformance is one part of that assessment, not a substitute for it.
AWS Glue DataBrew: profiles and quality rulesets: How profile jobs calculate data statistics and evaluate rulesets to verify quality independently of transformation success.
An AWS Glue DataBrew recipe job applies transformation steps and produces prepared data. A successful run tells you that processing completed; it does not establish that the output meets business requirements. For example, converting an amount column to a numeric type can succeed even when some amounts are negative.
AWS Glue: Data Quality rules: How AWS Glue Data Quality evaluates datasets with DQDL rules and uses evaluation results to identify or stop poor-quality data in ETL pipelines.
AWS Glue Data Quality checks data against expectations you define. Those expectations form a ruleset, written in Data Quality Definition Language (DQDL). Glue evaluates the rules against the dataset supplied to the evaluation, so choose a point in the ETL job where the data should meet those expectations.
Data Labeling: task-specific annotation: How to define and apply annotation rules that match a model’s prediction task and produce consistent, verifiable labels.
An annotation schema defines the target information attached to each example: its format, allowed values, and how many annotations are permitted. Choose it from the model’s prediction task. A category answers “what kind?”, a bounding box answers “where is each object?”, and a segmentation mask identifies which pixels belong to a region. These annotations are not interchangeable.
Human-in-the-Loop: human review in data annotation: How annotation workflows use human judgment to verify proposed labels, correct errors, and resolve ambiguous cases before labels enter training data.
In data annotation, a label describes an example for a learning task: a document category, an object boundary, or a sentiment class. Human-in-the-Loop annotation uses people to check candidate labels before those labels become training targets. A model or another annotator can propose a label; the reviewer must compare it with the original example and the annotation instructions, not simply approve the suggestion.
Label Quality: validating annotations: How to validate annotations against clear labeling criteria using independent audits, disagreement adjudication, and subgroup error checks.
Label quality means that an annotation fits the intended task and follows an explicit labeling policy. Calling a dataset “ground truth” does not establish that its labels are correct. Before reviewing annotations, define the allowed classes, class boundaries, required evidence, exceptions, and treatment of uncertainty.
Amazon SageMaker Ground Truth: labeling jobs: How a labeling job turns S3 data into training annotations through task configuration, workforce selection, label consolidation, and optional automated labeling.
An Amazon SageMaker Ground Truth labeling job turns unlabeled examples into annotations for training. Start with data in Amazon S3 and an input manifest: a JSON Lines file whose records identify the examples. For files such as images, a record can use source-ref to point to an S3 object.
Amazon A2I vs. Amazon SageMaker Ground Truth: When to choose A2I for human review of model outputs rather than Ground Truth for creating labeled datasets.
Amazon Augmented AI (Amazon A2I) adds human review to machine learning workflows. Choose it when a model has produced an output and people need to check, correct, or judge that output as part of the application’s workflow.
Algorithmic Bias: bias in training data: How to identify representation and labeling bias using group-level data checks, and judge when dataset splitting, shuffling, or targeted augmentation can reduce it.
Representation bias arises when training data inadequately covers people or conditions the model must serve. Start with the intended population, then compare each relevant group's record count and share with that population. Check combinations, such as language and region, because broad groups can hide missing coverage. Equal group sizes are not automatically the right goal.
Data Shuffling: controlling input-order effects: How to randomize records reproducibly for dataset splits and training batches while respecting time and entity boundaries and recognizing which biases shuffling cannot fix.
Data shuffling changes record order without intentionally changing values, labels, or overall frequencies. If files list all approved applications before rejected ones, taking the first portion for training can create an unrepresentative split. Feeding that order into training can also produce long runs of similar examples in successive minibatches.
Train-Validation-Test Split: representative, independent partitions: How to choose random, stratified, group-aware, or chronological splits that reflect the prediction population and prevent biased evaluation from leakage across partitions.
A useful split imitates the predictions you will make after deployment. Define the prediction population: new customers, new patients, future transactions, or another specific population. Use training data to learn model parameters, validation data to choose models and settings, and an untouched test set to evaluate the final choice.
Cross-Validation vs. Train-Validation-Test Split: How repeated evaluation within development data differs from assigning training, validation, and independent test roles to data.
A train-validation-test split assigns data three different jobs. The training set supplies examples from which a model learns parameters, such as weights. The validation set guides development decisions, such as choosing hyperparameters, comparing algorithms, or selecting a classification threshold.
Data Augmentation: improving underrepresented training data: How to target augmentation at underrepresented classes or groups and verify its benefits through leakage-safe generation and independent group-level evaluation.
Data augmentation creates additional training variations while preserving the correct label. Target it where the model lacks useful coverage, rather than making every class equally large. Start by counting training examples by class, relevant group, and important intersections, such as defect type within a camera condition.
Data Representativeness: multimodal population coverage: How coverage metrics guide sampling and weighting of numeric, text, and image data to reflect intended populations while preserving deployment-relevant evaluation distributions.
Representativeness means matching a defined deployment population, not simply collecting many examples. Specify the users, operating conditions, time period, and prediction unit the system will serve. For a system using numeric records, text, and images, the unit might be one support case with transaction values, a message, and an attached photo.
Bias and Fairness: bias in data distributions: How to measure group imbalances in numeric, text, and image datasets and choose distribution adjustments that address the measured bias.
Start a distribution audit by defining the unit you count, the relevant groups, and a justified reference distribution. Count people, documents, or images consistently; repeated records can make coverage look better than it is. Compute each group share as its count divided by the total. Report counts alongside percentages, especially for small groups.
Data Representativeness vs. Bias and Fairness: Why matching deployment populations does not guarantee fair outcomes, and why equal group counts do not establish representativeness.
Data representativeness asks whether a dataset reflects a defined deployment population and operating environment. Fairness asks whether the system treats people equitably under explicitly chosen criteria. One concerns what the data reflects; the other concerns how people are treated.
Subgroup Analysis: disparities in multimodal data: How to compare meaningful subgroups in numeric, text, and image data using bias metrics, account for sample size and label quality, and guide targeted distribution improvements.
Subgroup analysis compares data coverage and model behavior within meaningful groups, rather than trusting one overall score. Start with the people affected, the decision being made, and the harm an error could cause. Define groups and comparisons before evaluation where possible. A useful group reflects a real use condition, not just an available column.
Class Imbalance: imbalance-aware training: How to choose sampling or class-weighted training for numeric, text, and image data, apply interventions without leakage, and evaluate minority-class performance on representative data.
Class imbalance means that some labels have fewer examples than others. Equal class counts are not always the goal: failures and fraud really can be rare. Start by counting labels and training a baseline. If only 1% of examples are positive, predicting negative every time gives 99% accuracy but finds none of the positives.
Class Resampling: numeric training data: How to choose between random and synthetic resampling for numeric data, using valid feature interpolation and training-only sampling to protect evaluation.
Class resampling changes the class mix presented during training. It can give a rare class more influence, but a balanced training set is not the goal by itself. For example, when almost every transaction is legitimate, high accuracy can hide a model that misses most fraud.
SMOTE: generating minority-class training samples: How nearest-neighbor interpolation generates minority-class samples, when numeric, text, or image representations support it, and how to evaluate training-only resampling without leakage.
SMOTE, the Synthetic Minority Over-sampling Technique, adds minority-class examples to classification training data. Unlike random oversampling, which repeats existing records, SMOTE generates feature vectors between existing minority examples. Unlike undersampling, it does not require removing majority-class records.
Class Resampling: class-aware sampling for text and images: How to present rare-class documents and images more often during training while keeping labels valid and held-out examples untouched.
Class-aware sampling controls how often training selects examples from each class. It can present rare-intent documents or uncommon-defect images more often while keeping every example paired with its original label. Sampling with replacement allows an example to be selected again without storing extra copies.
Data Integrity: validation gates for AI training data: How validation gates check prompt–response examples against trusted sources and approved rules, quarantining mismatched, unexpectedly altered, or unsafe examples before dataset approval.
A validation gate decides whether a prompt–response example is eligible for an approved training dataset. It checks the example against trusted evidence and approved rules, rather than accepting it just because it arrived successfully or contains readable text.
Data Curation: quality gates for fine-tuning examples: How automated checks and human review admit only structurally valid, correct, and safe prompt-response examples into a fine-tuning dataset.
A fine-tuning example teaches a behavior: given this prompt and context, produce this approved response. A quality gate is a rule that an example must pass before admission to the training dataset. The first gate checks structural validity against the selected model and training platform: readable records, required fields, supported roles, appropriate field types, and applicable length limits. A file that parses successfully can still contain invalid examples.
Anomaly Detection: detecting outliers against expected patterns: How to choose contextual baselines and detection thresholds for data values and workflow metrics, then assess flagged observations before treating them as errors.
Anomaly detection identifies observations that differ from an expected pattern. An unusual value is a reason to investigate, not proof of an error. A large order may be normal for a wholesale customer but unusual for a retail customer. A long processing time may be expected for a large batch but unusual for a small one. Your baseline should describe comparable observations, not simply everything you have collected.
Missing Value Imputation: choosing reliable replacement rules: How to choose replacements from missingness patterns and field meaning, fit them without data leakage, and validate their effects on distributions and subgroup bias.
Missing value imputation replaces absent values so records remain usable. First identify how absence is recorded: NULL, NaN, empty strings, or sentinels such as -999. Normalize these only after checking the field definition. A recorded weight of zero is not automatically a missing weight, and an unanswered question is not automatically a negative answer.
Benchmark Datasets: representative test sets for model comparison: How to select and curate public and application-specific test cases that represent workload requirements, remain separate from development data, and support repeatable comparisons of candidate foundation models.
A benchmark dataset is a common set of test cases used to compare models. Start by identifying the application's tasks, users, languages, input lengths, and required behavior. A support assistant, for example, needs cases covering routine questions, ambiguous requests, and situations requiring escalation—not just general knowledge questions.
Context Window: sizing for a workload: How to assess a model's usable context capacity by budgeting request content and output against its limits and testing evidence use, latency, and cost on representative inputs.
A model's context window is the information it can work with during one inference request. For text, capacity is measured in tokens, not words or characters. Count system instructions, conversation history, examples, retrieved passages, tool definitions, and tool results—not just the latest question. Stored conversation history is visible to the model only when the application supplies it.
Model Evaluation: representative comparison tests: How representative held-out cases, subgroup coverage, and controlled test conditions make candidate-model comparisons reliable.
A representative comparison test asks how candidate models handle the work your application will actually receive. Start with the intended tasks, users, and operating conditions. Select cases that reflect that work, rather than choosing examples because a candidate answers them well. A public benchmark can help narrow the candidates, but it does not establish suitability for your application.
Model Evaluation: task-aligned performance metrics: How to choose and interpret task-specific metrics when comparing model quality against operational and business acceptance thresholds.
A task-aligned metric measures a result that matters for the intended use. Start with the decision the model supports and the consequences of getting it wrong. For classification, accuracy is the fraction of predictions that are correct, but it can hide poor detection of a rare class. If only 1% of cases need escalation, predicting “no escalation” for every case gives 99% accuracy while missing every required escalation.
Model Evaluation: rubric-based output assessment: How explicit scoring rubrics and human-calibrated model judges assess generated outputs for quality, safety, and unfair disparities.
A scoring rubric tells an assessor what to judge and what each score means. For generated answers, useful criteria include correctness, relevance, completeness, groundedness, and instruction following. Score these separately: a clear, relevant answer can still contain false claims. Give the assessor the user request, the response, and any evidence needed to judge it.
Fine-Tuning: full and parameter-efficient adaptation: How to choose and apply full-weight or parameter-efficient adaptation based on the target behavior, available resources, and measured improvement over a prompted baseline.
Fine-tuning creates a persistent model adaptation from targeted examples. Use it to improve a repeatable behavior, such as assigning support categories or producing summaries in an established format. Define success before training: for example, correct category selection and valid output structure, with acceptable safety, latency, and cost.
Parameter-Efficient Fine-Tuning: adapting a frozen base model: How to select and train task-specific parameters using methods such as LoRA, then evaluate and use the adaptation with its compatible base model.
Parameter-efficient fine-tuning (PEFT) adapts a pretrained model by training a limited set of parameters. Start with a prompted baseline: clear instructions and examples may already meet the need. Consider PEFT when representative examples are available and you need more consistent task behavior, terminology, style, or output structure. Use retrieval for changing facts or document-grounded answers; retrieval and PEFT can work together.
Parameter-Efficient Fine-Tuning vs. full fine-tuning: How the two approaches differ in trainable weights, training memory, customization artifacts, and suitability for the required adaptation.
Full fine-tuning and parameter-efficient fine-tuning (PEFT) both adapt a pretrained model. The difference is which parameters training can change. Full fine-tuning normally makes all original model weights trainable. PEFT freezes most or all original weights and trains a small subset of parameters or additional components. A frozen weight still participates in computation; training simply does not update it.
Instruction Tuning: Learning task behavior from demonstrations: How instruction–response training examples adapt a pretrained model’s behavior and when this approach fits an application’s requirements.
Instruction tuning teaches a pretrained model how to carry out requests using supervised demonstrations. Each example contains an instruction, optional input or context, and a desired response. Pretraining supplies broad language capabilities; instruction tuning builds on them to teach task behavior, such as extracting fields, summarizing reports, or answering in an application's preferred style.
Supervised Learning vs Unsupervised Learning: How learning from known targets differs from discovering structure without targets, and which business problems call for each approach.
Supervised learning learns from examples that pair inputs with known outputs. The inputs are features, such as purchase frequency or account age. The known output is a target, also called a label: for example, whether a customer later canceled a subscription. During training, the model adjusts to reduce disagreement between its predictions and those targets.
Supervised Learning: choosing a predictive model: How labeled targets define classification or regression tasks and guide algorithm selection under interpretability, predictive performance, and inference latency constraints.
In supervised learning, each training example pairs input features with a known target, also called a label. An algorithm fits a model to predict that target from the features. For example, account activity can be the input and a customer's later cancellation outcome the target. At prediction time, the model receives features; the outcome is not yet known.
Unsupervised Learning: choosing a structure-discovery method: How to choose clustering, dimensionality reduction, or anomaly detection based on the business objective, feature characteristics, and algorithm assumptions.
Choose a structure-discovery method by asking what someone needs to do with its output. Clustering discovers groups of similar observations, such as customer segments based on purchasing behavior. Its output is group membership, not predefined business categories: analysts must inspect each group before naming it or deciding how to act on it.
Interpretability-Performance Tradeoff: evidence-based model selection: How to compare interpretable baselines with complex candidates using measured predictive quality, explanation usefulness, latency, cost, and risk requirements rather than assuming complexity improves results.
An interpretable baseline, such as a small decision tree or sparse linear model, gives you a reference for both prediction quality and understandable behavior. Compare it with complex candidates rather than assuming an ensemble or neural network will improve results. Even a linear model can be difficult to understand when its inputs are heavily transformed or correlated.
Inference Latency: response-time tradeoffs: How to compare model and serving choices using realistic latency measurements to meet response-time targets without sacrificing required quality or exceeding inference budgets.
Inference latency is the time needed to obtain a model's output. Before comparing models, define where the timer starts and stops. Model execution latency covers model processing; end-to-end latency measures the application's full wait, including network transport, authentication, retrieval, queueing, and response delivery. A fast model can still sit inside a slow application.
AWS Marketplace: choosing third-party ML products: How to evaluate third-party model, algorithm, and solution listings using documented capabilities, deployment compatibility, licensing, and pricing to shortlist products for business requirements and performance testing.
AWS Marketplace is a catalog for finding and acquiring third-party products. For ML, start with a short requirements sheet: the task, input and output formats, domain and languages, interpretability needs, and quality and latency targets. Separate must-haves from preferences so a popular listing does not displace a business requirement.
Total Cost of Ownership: lifecycle costs of ML solutions: How to compare custom, managed, pre-trained, and foundation-model solutions using full lifecycle costs over a common evaluation period with equivalent workload requirements.
Total Cost of Ownership (TCO) estimates the complete cost of a solution over an agreed evaluation period. For ML, this includes preparing data, developing or adapting a model, deploying it, operating it, updating it, and retiring or replacing it—not just training or inference charges.
Cost-Benefit Analysis: incremental value of AI alternatives: How to compare custom, managed, and pretrained AI options with simpler baselines by weighing the business value of model quality and latency against lifecycle costs, including training time.
Start with a credible baseline: the current workflow, deterministic rules, or a simple statistical model. Define the business outcome, minimum acceptable quality, response-time limit, and evaluation period. AI must justify its additional effort against an approach that could actually meet the need. For exact contractual calculations, authoritative rules are usually the right baseline, not generated answers.
Cost-Benefit Analysis vs. Total Cost of Ownership: How deciding whether benefits justify an investment differs from estimating the investment's complete lifecycle costs.
Total Cost of Ownership (TCO) estimates what a solution will cost over its complete lifecycle within an agreed evaluation period. Cost-benefit analysis asks whether the expected benefits justify the investment. One measures the cost commitment; the other supports a decision about value.
Transfer Learning: choosing a pretrained model adaptation approach: How model suitability, available training data, and compute costs guide the choice between frozen-feature reuse, fine-tuning, and training from scratch.
Transfer learning reuses knowledge learned by a pretrained model. Its internal representations describe useful patterns, such as image shapes or language structure. Reusing those patterns can reduce the target data and training compute needed compared with learning comparable capabilities from scratch.
Amazon EC2 vs Amazon SageMaker: self-managed and managed ML hosting: How EC2's infrastructure control and operational responsibilities differ from SageMaker's managed model hosting.
Model hosting means running a trained model so an application can send input and receive predictions. Both Amazon EC2 and Amazon SageMaker can support this. The main difference is where your team's operational responsibility begins. Here, SageMaker hosting means the managed inference capabilities of Amazon SageMaker AI.
AWS Batch vs Amazon SageMaker: batch inference: When to choose AWS Batch for custom containerized inference rather than Amazon SageMaker batch transform for managed offline prediction.
Batch inference applies a trained model to a collected dataset when predictions do not need to return immediately to a user. Both AWS Batch and Amazon SageMaker batch transform can run this work without a persistent inference endpoint. The main choice is not whether the work is offline, but who controls the prediction workflow.
Amazon Bedrock vs Amazon SageMaker: hosting externally built models: When Bedrock Custom Model Import's supported-model constraints and managed inference fit better than SageMaker's broader serving flexibility and deployment control.
A model trained outside AWS does not have to be retrained on AWS to be hosted there. Amazon Bedrock Custom Model Import and Amazon SageMaker AI both provide routes to inference, but they accept different kinds of serving workloads.
Amazon Bedrock AgentCore and Amazon Bedrock: infrastructure versus managed AI capabilities: How AgentCore's framework-independent agent infrastructure differs from Amazon Bedrock's model access and managed Agents capabilities, and when they complement each other.
Amazon Bedrock AgentCore provides managed infrastructure for agent applications. Its capabilities address execution, memory, identity, tool connectivity, and operational visibility. It is framework-independent: your application can use its chosen agent framework rather than adopting a reasoning framework supplied by AgentCore.
Reranking and vector search: reordering versus retrieval: Why vector search determines which documents become candidates, while reranking reassesses those candidates and cannot recover missing evidence.
In a retrieval-augmented generation workflow, or RAG, vector search finds passages that could help answer a question. Documents are usually divided into chunks, with an embedding stored for each chunk. At query time, a compatible embedding represents the question. Search compares that query vector with stored vectors and returns a limited candidate set.
Vector Search: retrieval relevance: How to tune candidate selection for RAG through similarity search, metadata filtering, hybrid retrieval, and reranking, using measured relevance and latency.
In RAG, similarity search retrieves chunks whose embeddings are close to the query embedding. Use a compatible query embedding model and the similarity measure recommended for that model. A high similarity score signals closeness in that embedding space, not factual correctness or a probability of relevance.
Amazon Aurora: vector retrieval with PostgreSQL: How Aurora PostgreSQL uses pgvector to store embeddings and retrieve relevant content with SQL filters for a RAG application.
Retrieval Augmented Generation (RAG) retrieves relevant source material and includes it in a model's prompt. An embedding is a numeric representation of content used to compare meaning. Aurora PostgreSQL can store embeddings alongside the text and relational metadata that an application needs.
Bias-Variance Tradeoff: choosing model complexity: How training and validation errors reveal whether added model complexity improves generalization enough to justify its training time and cost.
Model complexity is a model’s flexibility to learn patterns: for example, a deeper decision tree can represent more detailed rules. Extra flexibility can improve predictions, but fitting the training examples better is not enough. Generalization means predicting well on examples the model did not learn from.
Hyperparameter Tuning: controlling training convergence: How to use training and validation curves to adjust learning rate, batch size, epochs, and step limits for stable convergence.
A training curve shows how a metric changes while a model learns. For loss, lower is better. Training loss measures fit to the examples used to update the model. Validation loss measures performance on held-out examples that do not update its parameters; use it to guide tuning and checkpoint selection, not the test set.
Hyperparameter Tuning: automated search: How to configure and compare automated search strategies within a validation objective and trial budget, including SageMaker AI automatic model tuning.
Automated hyperparameter tuning runs training trials with different configurations and compares their validation results. In Amazon SageMaker AI automatic model tuning (AMT), you supply the training setup, search space, objective, search strategy, and resource limits. Each trial learns model parameters; the tuner chooses hyperparameter values.
Model Compression: resource and quality tradeoffs: How quantization, pruning, and distillation change model resource requirements, and how deployment benchmarks and quality thresholds determine whether those changes are worthwhile.
Model compression reduces the resources a model needs while preserving enough predictive quality for its use. Separate three targets: model file size, runtime memory, and computation. A smaller file does not guarantee faster inference, and archive compression alone does not reduce inference work.
AWS Inferentia: choosing Inf1 and Inf2 instances: How Neuron model compatibility, accelerator memory requirements, and measured latency and throughput guide cost-effective selection of Inf1 or Inf2 instances.
AWS Inferentia accelerates inference: running a trained model to produce predictions. Amazon EC2 Inf1 instances use first-generation Inferentia chips; Inf2 instances use Inferentia2. Inf2 provides more accelerator memory per chip and is designed for more demanding workloads, including large language and diffusion models. That does not make it the cheapest choice for every model.
Amazon Comprehend: pre-trained text analysis: How to select and invoke pre-trained text analysis APIs and interpret their labels, extracted insights, and confidence scores in an application.
Amazon Comprehend analyzes existing text with pre-trained natural language processing models. Your application selects an operation for the insight it needs; you do not train a model or deploy a custom endpoint for these operations. A single text can be sent to several operations, but one operation does not automatically return every kind of insight.
Amazon Comprehend and Amazon Textract: text analysis versus document extraction: When a workload needs Comprehend to analyze text, Textract to extract text and document structure, or both in sequence.
Amazon Textract extracts text and document structure from document images, including scanned documents. It can recognize printed and handwritten text and extract relationships such as form keys and values or table cells. It answers questions such as “What words are on this page?” and “Which value belongs to this field?”
Amazon Rekognition: pretrained image and video analysis: How to select Rekognition analysis APIs for visual recognition needs and interpret their detections and confidence scores.
Amazon Rekognition provides pretrained visual analysis through APIs, without requiring you to train or host a model. Start with the question your application must answer: what is visible, whether content needs review, where faces are, or whether faces match.
Amazon Rekognition vs Amazon Textract: text in images: When scene-text detection with Rekognition fits better than document text, form, and table extraction with Textract.
Both services can recognize text in images, but they target different jobs. Amazon Rekognition fits scene text: words appearing within a wider picture, such as a shop sign, a product name on packaging, or lettering on a vehicle.
Amazon Transcribe: speech-to-text processing: How batch and streaming transcription turn business audio into usable text, with language selection, speaker attribution, and vocabulary customization.
Amazon Transcribe converts speech into text using automatic speech recognition. It can produce punctuation and word timestamps, making recordings useful for searching, reviewing conversations, and creating captions. Recognition is not perfect: noise, overlapping speech, and unfamiliar terms can affect the result.
Amazon Transcribe and Amazon Comprehend: transcription versus text analysis: When a business requirement needs speech converted into text versus insights extracted from existing text.
Amazon Transcribe converts speech into written words. This is speech recognition: a recorded interview or spoken customer message becomes a transcript that people and applications can read.
Amazon SageMaker: managed training jobs: How managed training jobs run built-in algorithms or framework scripts using configured input channels, hyperparameters, compute resources, and model artifact outputs.
An Amazon SageMaker AI managed training job runs training code in a container on compute resources provisioned for that job. You configure the workload; SageMaker provisions the resources, runs training, saves the outputs, and releases the training resources afterward.
TensorFlow on AWS: training models with Keras: How to prepare tf.data inputs, configure a Keras model, and train it in an AWS TensorFlow environment.
TensorFlow on AWS uses ordinary TensorFlow and Keras code inside an AWS execution environment. AWS Deep Learning AMIs provide an instance-based environment on Amazon EC2; AWS Deep Learning Containers provide container images. Amazon SageMaker AI can manage training jobs. Choose a TensorFlow version compatible with your code and, for GPU training, its accelerator libraries.
PyTorch on AWS: training custom models: How to train a custom neural network on AWS compute using PyTorch data loaders, neural network modules, automatic differentiation, and optimizers.
PyTorch supplies the training code; AWS supplies the compute and storage. Run your script on Amazon EC2 using a PyTorch Deep Learning AMI, or submit it as an Amazon SageMaker AI training job with a PyTorch container. Here, use one training process on a CPU or a single GPU. Make training files in Amazon S3 available locally before reading them, and give the compute an IAM role with the required S3 permissions.
Random Search: configuring a bounded tuning experiment: How to configure and evaluate independently sampled hyperparameter trials in SageMaker AI automatic model tuning using suitable sampling distributions, a validation objective, and total-job and concurrency limits.
In SageMaker AI automatic model tuning, select Strategy="Random" to sample hyperparameter configurations independently of earlier trial results. Each configuration supplies settings to a training job; training learns the model parameters. The search returns the best configuration observed, not a guaranteed global optimum.
Bayesian Optimization: feedback-guided hyperparameter search: How surrogate predictions and uncertainty guide successive trials within a defined search space, validation objective, and trial budget.
Bayesian optimization guides expensive evaluations toward promising configurations. In hyperparameter tuning, each trial trains a model with one configuration and measures its validation performance. Hyperparameters, such as learning rate and tree depth, control training; they are not the weights learned during training.
Bayesian Optimization vs Random Search: How feedback-dependent and independent trial selection differ in sample efficiency, parallel execution, and suitability for expensive training runs.
A trial trains and evaluates a model using one hyperparameter configuration, such as a learning rate and tree depth. Both Bayesian optimization and random search compare trial results using a validation objective. The important difference is whether those results influence the selection of later configurations.
Early Stopping: validation-based stopping rules: How validation metrics, evaluation frequency, improvement thresholds, and patience determine when training stops while preserving the best model checkpoint.
Early stopping ends training before its maximum number of epochs, steps, or boosting rounds when a validation metric stops improving meaningfully. It reduces work that provides little benefit and can limit overfitting. Keep a maximum training budget as a separate limit: early stopping does not guarantee that a plateau will occur.
Mixed Precision Training: applying a stable precision policy: How to enable hardware-compatible FP16 or BF16 training with appropriate FP32 operations and loss scaling, then validate speed and model quality against an FP32 baseline.
Mixed precision training uses lower precision for suitable operations and FP32 where extra numerical protection is needed. Matrix multiplications and convolutions often benefit from FP16 or BF16 arithmetic. Smaller activations can also reduce memory use, but total training memory does not necessarily halve: parameters, optimizer state, and other buffers may remain in FP32.
Distributed Training: Configuring data-parallel training: How to configure synchronized workers for correct data-parallel training and determine when adding workers reduces training time.
Synchronous data parallelism gives every worker a complete model replica. Workers process different samples, compute gradients, and combine those gradients before applying matching optimizer updates. An all-reduce combines contributions and returns the result to every worker; these are not independent training jobs.
Overfitting versus underfitting: How training and validation error patterns distinguish overfitting from underfitting and explain why they require opposite adjustments to model complexity.
Training error measures mistakes on examples used to fit the model. Validation error measures mistakes on held-out examples and helps you choose between model configurations. Here, error means a task-appropriate measure where lower is better.
Overfitting: controlling training-specific fit: How validation-guided regularization, model complexity limits, and early stopping reduce learning of training-specific noise rather than generalizable relationships.
Overfitting happens when a model learns training-specific details rather than relationships that hold for new examples. A lower training error is not always progress: the model may be fitting noise or accidental correlations. Controls against overfitting aim to preserve useful relationships while reducing this training-specific fit.
Underfitting: removing limits on model fit: How to address inadequate model fit by improving predictive features, increasing model capacity, relaxing excessive regularization, or allowing training to converge.
Underfitting means a model has not captured meaningful relationships in the data. Once you have checked data quality and preprocessing, look for limits in its inputs, capacity, regularization, or training time. The goal is to remove a specific limit, not simply make every setting larger.
Catastrophic Forgetting: preserving capabilities during fine-tuning: How updates disrupt earlier capabilities, how replay and constrained updates reduce that loss, and how old-task evaluations verify retention.
Catastrophic forgetting is a substantial loss of previously learned capabilities after additional training. A neural network's parameters, the learned values that shape its predictions, often support several capabilities at once. Fine-tuning changes those shared values to improve the new training objective. Those changes can disrupt patterns that earlier tasks depend on.
Catastrophic Forgetting vs. Overfitting: How losing previously learned capabilities differs from poor generalization on a newly trained task, even when both occur together.
Catastrophic forgetting is a substantial loss of previously learned capabilities after additional training. For example, fine-tuning a model on support conversations can make it worse at summarization because updates change shared parameters that supported that earlier capability.
Ensemble Learning: combining complementary models: How to combine complementary model outputs and validate whether the ensemble improves prediction quality within inference cost and latency budgets.
An ensemble combines predictions from multiple models into one result. Its advantage comes from complementary errors: one model gets some examples right that another gets wrong. Different algorithms, training samples, or feature sets can create this diversity. Compare models on the same validation examples and inspect where they fail together. Different model names alone do not prove useful diversity, and disagreement alone does not prove improvement.
Model Cascading: selective escalation: How acceptance checks control escalation between model stages and determine the cascade's end-to-end quality, cost, and latency.
A selective cascade starts with an inexpensive model and invokes a more capable model only for selected requests. The acceptance check decides whether the first result is good enough to return or needs escalation. An incorrect result accepted here never reaches the later model.
Ensemble Learning vs. Model Cascading: How combining model contributions differs from conditionally escalating requests through models, and why a system can use both.
Ensemble learning combines contributions from multiple models into a prediction or decision. For example, two models can estimate transaction risk and a combiner can average their compatible probability estimates. The defining question is: How do multiple model contributions determine the result?
Knowledge Distillation: teacher-to-student training: How teacher probabilities or generated answers train a student, and how to evaluate whether its quality and inference savings justify the training cost.
Knowledge distillation trains a student model to approximate a teacher’s behavior, rather than copying its parameters. The teacher is usually more capable; the student is often smaller and specialized for a workload. Lower inference cost is a goal, not a guaranteed result.
Knowledge Distillation vs. Ensemble Learning: Why distillation transfers behavior into a student whereas an ensemble combines multiple models’ predictions, creating different inference costs and deployment requirements.
Knowledge distillation trains a student model to approximate a teacher’s behavior. The teacher supplies training signals, such as output probabilities or generated answers. Training changes the student’s parameters so it can produce useful answers itself; it does not simply copy the teacher’s parameters. A smaller student is common, but not required.
Batch Size: choosing an effective training batch: How per-device batch size and gradient accumulation determine effective batch size and its tradeoffs in memory, throughput, and learning behavior.
Per-device batch size is the number of training examples one device processes in a single forward-and-backward pass. That pass calculates a loss and gradients: values the optimizer uses to adjust model parameters. Effective batch size is the total number of examples contributing to one optimizer update.
Epochs: setting the training duration: How to choose an epoch limit using validation performance and early stopping to balance learning, overfitting, and compute cost.
An epoch is one complete pass through the training dataset. Repeating those passes gives the model more opportunities to learn. The epoch limit sets the maximum number of passes a training run may complete; it does not identify the best model in advance.
Batch Size vs. Epochs: grouping examples versus repeating data: Why changing batch size while holding epochs constant changes the number of optimizer updates, not the number of passes through the dataset.
Batch size controls how many training examples are processed together. Epochs count passes through the training dataset. Dividing a dataset into smaller groups does not create extra passes: it creates more groups within each pass.
Reranking: configuring second-stage relevance scoring: How to configure and evaluate reranking over retrieved candidates to improve selected evidence while balancing ranking quality, latency, and cost.
Reranking adds a relevance assessment after retrieval and before evidence selection. Configure two separate limits: the candidate count, which bounds how many retrieved passages are scored, and the output count, which bounds how many highest-ranked passages are selected. For example, you might score 40 candidates and select 5 passages. These are illustrative choices, not recommended defaults. Reranking cannot select evidence that was not supplied as a candidate.
Determinism: repeatable ML experiments: How controlling inputs, random state, model and dependency versions, and execution conditions makes ML experiments repeatable, and why fixed seeds alone are insufficient.
Determinism means that identical inputs, initial state, and execution conditions produce identical results. In an ML experiment, the effective inputs include the training records, labels, preprocessing, and train/validation/test assignments—not just the command you run.
Version Control: version-pinned AI releases: How immutable model and agent revisions, linked to their dependencies and release history, support repeatable deployments, audits, and rollback.
A version-pinned release names the exact model or agent revision to deploy instead of asking for whatever is newest. Treat released content as immutable: preserve it, and create another revision for a change. Development can then continue without silently changing production.
Version Control: prompt revision histories: How editable prompt drafts become immutable, identifiable versions that applications can reference without inheriting subsequent edits.
A reusable prompt is an application artifact: changing its instructions can change application behavior. In Amazon Bedrock Prompt Management, you develop that artifact in an editable draft. You can revise the instructions, template variables, and supported model configuration while you work.
Experiment Tracking: reproducible run records: How persistent run records connect model artifacts and registered versions to immutable inputs, code revisions, configuration, environments, and evaluation results for repeatability and audits.
An experiment groups related work; a run records one execution, such as training or evaluation. Give each run a unique run ID. In MLflow on Amazon SageMaker AI, training code can log parameters, metrics, and artifacts to a tracking server. That record remains available after the training compute stops.
Experiment Tracking vs. Version Control: How recording execution evidence differs from versioning source assets, and why a version identifier alone cannot explain or reproduce a model result.
Version control preserves identifiable revisions of assets such as source code, configuration files, and prompts. It answers questions such as “What changed?” and “Which source revision did we use?” A Git commit identifies a recorded source snapshot; it does not prove that the code ran or that its output passed evaluation.
Data Drift vs. Model Drift: How changes in input distributions differ from changes in model predictive performance, and why detecting input drift does not establish degraded accuracy.
Data drift means that the distribution of incoming data differs from a reference distribution, such as training data or an accepted production period. It answers: Has the data reaching the model changed? Examples include different income ranges, new product categories, or a larger share of customers from one region. Inputs can follow the correct schema and still show data drift.
Model Drift: baseline-based production monitoring: How reference datasets, monitoring windows, distribution comparisons, and outcome metrics reveal meaningful changes while accounting for noise and delayed labels.
Baseline-based monitoring compares recent production observations with a documented reference. The reference dataset represents accepted behavior: it might be validated training data or a production period with known, acceptable performance. Training data is not automatically a suitable reference if production serves a different population.
Population Stability Index: measuring distribution shifts: How to calculate PSI using fixed baseline bins, handle sparse or empty bins, and calibrate drift alerts without mistaking population changes for degraded model accuracy.
Population Stability Index (PSI) compares a reference distribution with a current distribution, usually for one input feature or prediction score at a time. Choose a representative reference, such as a validation dataset or a stable production period. PSI measures population change; labeled performance evaluation measures how well predictions match actual outcomes.
Amazon CloudWatch: custom quality metrics: How to publish application-computed retrieval quality and model evaluation results as custom metrics without treating CloudWatch as the evaluator.
Custom quality metrics are numbers that your application or evaluation workflow produces and publishes to Amazon CloudWatch. CloudWatch stores and monitors those numbers; publishing a metric does not ask CloudWatch to judge retrieved documents or model answers.
Model Drift: the retraining feedback loop: How investigated drift signals feed a retraining workflow with data-quality checks, representative evaluation, and replacement gates instead of automatically replacing the model.
A drift signal is a reason to investigate, not permission to replace the production model. Check what changed, which predictions are affected, and whether available outcomes show a meaningful performance problem. An automated workflow can collect this evidence without automatically authorizing retraining.
Shadow Testing: evaluating candidates with mirrored traffic: How isolated production-traffic mirroring supplies quality and runtime comparisons for automated release gates that advance or stop a candidate without changing production serving.
Shadow testing runs a candidate on copies of real requests while the production variant continues supplying every user response. The candidate's outputs become evaluation evidence, not serving decisions.
Blue-Green Deployment vs Shadow Testing: How promoting a replacement environment to serve users differs from copying requests to a candidate whose responses do not affect users.
Blue-green deployment keeps a current environment and a replacement environment separate. Blue serves the current version while green holds the replacement. Promotion redirects production traffic to green, making the replacement responsible for user responses.
Canary Deployment vs Shadow Testing: Why canary candidates serve responses to a limited production audience while shadow candidates process copied requests without determining user responses.
A candidate is the new version being evaluated; the stable version is the established version. Both canary deployment and shadow testing run a candidate against production inputs. Their defining difference is whether the candidate's output determines a user's response.
Shadow Testing versus A/B Testing: Why withholding versus serving candidate responses changes user exposure and which quality or business-impact conclusions a comparison supports.
Shadow testing runs a candidate on copies of live requests while the production version continues answering users. The candidate response is retained for evaluation, not served. A request can therefore produce two outputs for comparison, but only the production output determines the user's experience.
LIME: local surrogate explanations: How perturbations and proximity weighting produce an interpretable surrogate for one prediction, and how local fit and sampling stability limit what its feature weights mean.
LIME, short for Local Interpretable Model-Agnostic Explanations, explains an individual prediction using a separate, simpler model called a local surrogate. It treats the trained model as a black box: it needs to submit inputs and retrieve outputs, not inspect weights or gradients. The surrogate approximates the model near one input; it does not replace the original model.
SHAP: interpreting feature attributions: How feature contributions explain predictions relative to a chosen baseline and output scale, and what their aggregation reveals without establishing accuracy or causality.
SHAP assigns credit to input features for a model output, based on their marginal contributions across combinations of available features. For one record, the explanation follows baseline + sum of feature contributions = explained output, subject to approximation error. The baseline is typically the expected model output over selected background data, not zero or the prediction for an all-zero input.
LIME and SHAP: distinguishing explanation methods: How LIME’s local surrogate approach differs from SHAP’s Shapley-value-based attribution, including why SageMaker Clarify’s built-in SHAP explanations are not LIME.
LIME and SHAP explain model outputs after a model has been trained. Both can explain an individual prediction, so “local explanation” does not distinguish them. The important difference is how each method constructs its explanation.
Model Explainability: interpreting feature attributions: How to interpret SHAP and LIME explanations of individual predictions, relate them to global model behavior, and recognize limitations from baselines, correlated inputs, and noncausal associations.
A local explanation describes one prediction, not the model's behavior everywhere. Before reading feature contributions, identify the output being explained: which class, and whether the values use probability, log-odds, or another score. A positive contribution raises that output; it does not necessarily mean a desirable outcome.
Learning Rate Schedules: schedule shape and timing: How warmup, decay, and plateau-triggered reductions affect convergence, and how learning-rate and loss traces reveal incorrect schedule settings or advancement timing.
The learning rate controls how strongly an optimizer changes model parameters using gradient information. A schedule changes that rate during training. Larger rates can support fast early progress, while smaller rates can help later refinement. Even adaptive optimizers such as Adam can benefit from a scheduled base learning rate.
Gradient Clipping: controlling exploding gradients: How norm and value clipping constrain excessive gradients before optimizer updates, and how gradient measurements guide threshold selection and verification of training stability.
Exploding gradients are excessively large gradients produced during backpropagation. They can cause disruptive parameter updates, loss spikes, oscillation, or numerical overflow. Gradient clipping limits these gradients before the optimizer uses them; it does not change the loss calculation itself.
Unit Testing vs Model Evaluation: code correctness and model quality: Why passing deterministic code tests does not establish model quality, and which kinds of failures belong to each validation layer.
Unit testing asks whether a small piece of code follows its contract for known inputs. For example, a test can check that a feature function calculates the expected value or that a response parser handles a fixed model response correctly. Passing establishes those tested behaviors, not the quality of the model's predictions.
Output Validation vs Model Evaluation: How enforcing acceptance requirements at response-consumption boundaries differs from measuring model quality, and why evaluation results do not replace runtime validation.
Model evaluation measures how well a model or AI application performs on a task. It produces evidence for decisions such as choosing a model, approving a release, or investigating a quality decline. It can assess individual answers, but those assessments contribute to understanding quality under the evaluated conditions.
Cross-Validation: reliable evaluation across folds: How to compare model configurations using representative, leakage-safe folds and interpret their aggregate scores and variability.
Cross-validation evaluates a model configuration across several training and validation partitions of development data. A configuration includes choices such as model type, hyperparameters, and preprocessing. In standard k-fold cross-validation, divide the data into k nonoverlapping folds, train on k minus one folds, and validate on the remaining fold. Repeat until each fold has served as validation data once.
Model Evaluation: repeatable regression suites: How versioned evaluation suites detect model and prompt regressions through automated release gates and recurring production assessments.
A regression suite is a saved collection of evaluation cases and scoring rules that you run again after changes. It checks whether a new model, prompt, or application configuration makes previously acceptable behavior worse. Treat a prompt edit as an evaluation-triggering change, even when the model stays the same.
Human-in-the-Loop Evaluation: rubric-based review workflows: How to build a repeatable evaluation workflow using representative test cases, anchored scoring rubrics, calibrated reviewers, and aggregated judgments of model output quality.
Human-in-the-loop evaluation uses people to assess model outputs against explicit criteria. It is useful for open-ended tasks where several answers can be acceptable. A repeatable evaluation starts with the application's requirements: for a support assistant, an answer might need to follow the refund policy, address the question, and avoid invented exceptions.
Human-in-the-Loop Evaluation vs. Human-in-the-Loop: How structured human assessment of model quality differs from broader human participation that approves, corrects, or directs an AI system's actions.
Human-in-the-loop is the broad idea of deliberately involving people in an AI workflow. People may approve a proposed action, correct an output, request more information, or direct what happens next. Human-in-the-loop evaluation is a specific use of that involvement: people assess model outputs against explicit quality criteria.
Inter-Rater Agreement: reliability of human ratings: How to select and interpret agreement measures from independent, overlapping ratings to assess the reliability of human evaluation.
Inter-rater agreement measures how closely independent human evaluators judge the same material. It describes an evaluation process: the rubric, sampled items, and evaluator population all matter. Agreement is not the same as correctness; reviewers can agree because they share a misconception.
Amazon A2I: human review workflows: How flow definitions connect review activation, worker task templates, and work teams to collect human judgments on model outputs, including custom text-generation evaluations.
Amazon Augmented AI (Amazon A2I) manages human review of model outputs. A flow definition is the reusable workflow configuration: it connects a worker task template, a work team, and an output location, with activation conditions for supported built-in integrations. A human loop is one execution of that workflow for an item being reviewed.
N-Gram Overlap: reference-based lexical scoring: How tokenization and matching n-gram counts underpin BLEU and ROUGE-N scores, and what those scores can and cannot establish about generated text.
N-gram overlap compares a generated candidate with one or more reference answers by counting matching token sequences. An n-gram contains n consecutive tokens: a unigram has one, a bigram two, and a trigram three. It measures shared wording, not correctness or meaning directly.
BLEU: scoring generated text against references: How clipped n-gram precision and the brevity penalty produce reproducible corpus scores, and why lexical overlap does not establish semantic or factual correctness.
BLEU, short for Bilingual Evaluation Understudy, compares generated text, called the candidate, with one or more reference texts. It measures matching sequences of tokens. An n-gram is a consecutive sequence: a unigram contains one token, a bigram contains two, and so on. Tokenization determines the tokens.
ROUGE: reference-overlap scoring: How to calculate and interpret ROUGE-1, ROUGE-2, and ROUGE-L precision, recall, and F1 while accounting for preprocessing choices and lexical-matching limitations.
ROUGE compares generated text, the candidate, with an acceptable reference. It is useful for reference-based tasks such as summarization. ROUGE-1 counts individual-token matches. For each distinct token, take the smaller of its candidate and reference counts, then add those matches. This clipping prevents repetition from earning unlimited credit.
BLEU vs ROUGE: precision and recall in text evaluation: How BLEU's precision-oriented matching differs from commonly used recall-oriented ROUGE measures, and why that distinction matters for translation versus summarization.
Text-overlap metrics compare a generated candidate with an approved reference. For translation, the reference is a translation in the target language. For summarization, it is a reference summary—not the entire source document. Precision asks how much of the candidate matches the reference; recall asks how much of the reference the candidate covers.
Semantic Similarity: evaluating preservation of meaning: How embedding-based comparisons assess meaning preservation, how to calibrate their scores, and why high similarity does not establish factual correctness or completeness.
Semantic similarity estimates how closely two texts convey similar meanings. To evaluate an answer, compare the candidate with a suitable reference answer. An embedding model converts each text into a numerical vector. Use the same compatible model and configuration for both texts so their vectors share a meaningful coordinate system.
N-Gram Overlap vs Semantic Similarity: Why matching wording and matching meaning can rank the same outputs differently, especially for paraphrases and meaning-changing word substitutions.
A generated candidate can be compared with a reference in two ways. N-gram overlap asks which token sequences match. Semantic similarity asks how closely the texts express the same meaning. Matching wording and matching meaning are related, but they are not the same objective.
BERTScore: contextual token matching: How contextual token similarities produce reference-based precision, recall, and F1, and why these scores do not establish factual correctness.
BERTScore compares generated text, called the candidate, with a reference answer. A pretrained contextual encoder represents each token as a vector that reflects its surrounding text. Tokens can be parts of words, not just whole words. The scoring encoder is separate from the model that generated the answer.
BERTScore vs BLEU: semantic similarity and lexical overlap: How contextual token similarity and modified n-gram precision differ in their treatment of paraphrases and their suitability for evaluating generated text.
BLEU and BERTScore compare generated text, called the candidate, with trusted reference text. They answer different questions: how much wording overlaps, and how similar tokens are in context. Neither directly measures whether an answer is correct.
Bias and Fairness: evaluating model outputs: How to evaluate disparities in model outputs using context-appropriate fairness criteria, subgroup comparisons, and matched-prompt tests for generative models.
Fairness evaluation asks whether model outputs treat people equitably under an explicitly chosen criterion. Start with the decision, the affected groups, and the harm you want to detect. A difference between groups is evidence to investigate, not automatic proof of unfair treatment. Overall accuracy cannot answer every fairness question.
LLM-as-a-Judge: rubric-based evaluation: How to configure judge inputs, rubrics, and scoring modes, then calibrate judgments against human reviews to detect bias and unreliable scores.
LLM-as-a-Judge uses a language model to assess a candidate answer against explicit criteria. Its judgment depends on the evaluation prompt, not on a universal definition of quality. Supply the original task, the candidate answer, and the rubric. Add a reference answer or supporting documents when the criteria require them.
Output Validation: response acceptance checks: How to assess generated responses against explicit structure, safety, sensitive-data, and grounding criteria before allowing downstream use.
Output validation checks a generated response before another component relies on it. Treat the response as untrusted input, even when it is fluent or follows the requested format. Define an acceptance contract for its destination: required structure, permitted content, sensitive-data restrictions, and evidence requirements. A prompt asking for correct JSON is not enforcement.
Precision@k: evaluating top-k retrieval relevance: How to measure and monitor top-k relevance using consistent evaluation units, relevance judgments, retrieval stages, and query-level comparisons.
Precision@k measures the fraction of the first k retrieved results that are relevant to a query: Precision@k = relevant results in the first k / k. If three of the first five results are relevant, Precision@5 is 3/5 = 0.60. Count only results inside the cutoff; a relevant result at rank six does not contribute to Precision@5.
Recall@k: measuring retrieval evidence coverage: How to calculate and monitor Recall@k using labeled queries, consistent relevance judgments, and the evidence retained in the final RAG context.
Recall@k measures how much of a query’s relevant evidence appears in its first k retrieval results. In retrieval-augmented generation, or RAG, missing evidence can leave the model unable to answer completely, even when its response sounds fluent. Measuring coverage starts with representative queries and explicit relevance judgments.
Precision@k vs Recall@k: relevance versus coverage: How the metrics' different denominators distinguish irrelevant retrieved context from missed relevant evidence, and why high precision can coexist with low recall.
In retrieval-augmented generation (RAG), retrieved passages supply evidence for an answer. Precision@k asks, “How much of the top-k context is relevant?” Recall@k asks, “How much of the relevant evidence did the top-k results recover?” Both count the relevant items retrieved, but they divide that count by different totals.
Amazon CloudWatch: model invocation telemetry: How to use model invocation metrics and logs to examine production inference latency, token consumption, throttling, and errors.
Model invocation telemetry describes how production requests behave: how long inference takes, how many tokens it consumes, and whether requests are throttled or fail. This lesson uses Amazon Bedrock inference as the source and Amazon CloudWatch as the place to examine that evidence.
AWS X-Ray and Amazon CloudWatch: traces versus metrics and logs: When troubleshooting calls for X-Ray request traces rather than CloudWatch metrics or logs, and how their evidence complements each other.
CloudWatch metrics describe measured behavior over time: request counts, error rates, latency, or resource use. Use them to establish when a problem started, how widespread it is, and whether performance has recovered. A latency increase shows a symptom, but does not identify which dependency delayed an individual request.
Amazon Managed Service for Prometheus vs Amazon CloudWatch: metrics backends: When performance dashboards need a Prometheus-compatible metrics backend rather than CloudWatch's AWS-native monitoring capabilities.
A performance dashboard needs a metrics backend: a service that stores measurements over time and answers queries about them. Choose that backend from how metrics are collected and queried, not simply from where the application runs.
Amazon Managed Grafana vs Amazon CloudWatch: dashboard choices: When to use Grafana for visualization across data sources rather than CloudWatch dashboards alongside native AWS metric collection and monitoring.
Amazon CloudWatch collects and stores operational telemetry and provides dashboards and alarms. Many AWS services publish metrics to it automatically; applications can also publish custom metrics. Choose CloudWatch dashboards when the view mainly uses CloudWatch data and belongs alongside your AWS monitoring workflow.
Amazon EC2: instance configuration for ML workloads: How instance families, accelerators, and machine images determine an EC2 deployment's suitability for an ML workload.
An EC2 instance type determines the hardware available to your workload. Its family emphasizes a resource mix; its size determines the amount of those resources. Start with the workload's bottleneck rather than choosing the largest instance. CPU-based preprocessing, an in-memory feature transformation, and deep learning training can need different configurations.
Amazon EC2 instance types: hardware profiles for ML workloads: How to match ML workloads to instance-family resource profiles using model compatibility, resource requirements, and measured inference price-performance.
An EC2 instance type is a hardware profile: CPU architecture, virtual CPUs, memory, networking, storage connectivity, and sometimes accelerators. The family identifies a resource emphasis; the size scales resources within that family. In m7i.large, m is the general-purpose family, 7 is the generation, i identifies an Intel processor variant, and large is the size. Equal size labels across families do not mean equal resources.
Amazon SageMaker: hosting externally built models: How externally trained artifacts and compatible inference containers become SageMaker models, endpoint configurations, and invocable endpoints.
Amazon SageMaker AI can host a model trained outside AWS without running a SageMaker training job. Hosting needs two things: the model artifacts, such as learned weights and preprocessing files, and a compatible inference container that loads those files and serves predictions.
Amazon ECS: multi-container task definitions: How task definitions group model-serving containers for shared scheduling and lifecycle, and when independently scaled models need separate ECS services.
An Amazon ECS task definition is a versioned blueprint for running containers. Its container definitions specify images, commands, resource settings, and other runtime configuration. A model-serving application can put a prediction API and its model server in the same task definition.
Amazon EKS: Kubernetes deployments for model serving: How Kubernetes Pods, Deployments, and Services organize and expose model-serving workloads, including multiple models and cooperating containers.
Amazon EKS provides a managed Kubernetes control plane. You describe your model-serving application with Kubernetes objects; EKS does not choose how your models are packaged or exposed.
Amazon ECS vs Amazon EKS: choosing a container orchestrator: How ECS's AWS-native orchestration differs from EKS's Kubernetes-based approach in operational responsibility, ecosystem compatibility, and portability.
A container orchestrator schedules containers, keeps the requested workloads running, and coordinates replacements when they fail. Amazon ECS provides AWS-native orchestration through ECS APIs and configuration. Amazon EKS provides managed Kubernetes, using Kubernetes APIs and configuration. Both can run containerized model-serving applications; needing multiple containers does not by itself decide between them.
Real-Time Inference: synchronous request serving: How end-to-end latency budgets and ready serving capacity determine whether real-time prediction can meet an application's response requirements.
Real-time inference returns a prediction within the original application request. Its usefulness depends on the application's end-to-end latency budget: the time allowed from sending input to receiving the response. Real-time does not mean instantaneous or guarantee a deadline.
Batch Inference: efficient offline prediction jobs: How dataset-sized inference jobs trade prediction freshness for throughput and cost efficiency through resource utilization, batch sizing, and foundation-model batch pricing.
Batch inference applies a trained model to a collected dataset and saves predictions for later use. A job can start on a schedule or when its dataset is ready. Its useful performance measure is throughput: records processed per unit of time, rather than how quickly one prediction returns.
Asynchronous Inference: queued request lifecycle: How acknowledgment, queued execution, and separate result delivery support long-running predictions and bursty workloads that tolerate delayed results.
Asynchronous inference separates request acceptance from model execution and result delivery. The application receives an acknowledgment without keeping its original connection open until the prediction finishes. Acceptance does not mean that inference has succeeded.
Batch Inference vs Real-Time Inference: How prediction deadlines and freshness requirements distinguish workloads suited to batch jobs from those requiring interactive responses.
Batch inference applies a trained model to a collected dataset and saves predictions for later use. Its deadline is about when the results must be ready for a downstream activity. A campaign can use batch scores if the job finishes and publishes them before the campaign starts. Batch jobs can start on a schedule or when a dataset is ready.
Asynchronous Inference vs Real-Time Inference: How separate result delivery differs from returning predictions within the original request, and why asynchronous client code does not change that contract.
An inference response contract defines what the caller receives from submitting a prediction request. With real-time inference, a successful invocation returns the prediction within the original request-response exchange. The caller needs that response to obtain the prediction.
Asynchronous Inference vs Batch Inference: How independently submitted, queued requests differ from finite dataset jobs, and how arrival patterns and delivery requirements determine the choice.
Asynchronous inference accepts independently submitted prediction requests over time and queues them for processing. Each request has its own result to deliver later. Batch inference processes a defined, finite dataset as a job, with outputs intended for later use. Both can run in the background; background execution alone does not distinguish them.
AWS Batch: queued inference jobs: How containerized inference jobs run through job definitions, queues, and compute environments to process offline predictions without a persistent serving endpoint.
Offline inference processes a collected dataset and saves predictions for later use. With AWS Batch, you submit a finite containerized job: it starts when resources are available, makes predictions, and exits. There is no persistent serving endpoint waiting for prediction requests.
Foundation Models: inference deployment options: How accessing a foundation model through a managed API differs from hosting its weights, and how model requirements, operational control, governance, and measured cost-performance determine the deployment choice.
Inference means using a trained model to produce an output. With a managed model API, you select an available model and send requests to a provider-operated service. Amazon Bedrock offers this approach: you do not provision the model’s inference servers or obtain its weights simply by calling the API.
Open-Source Models: deployment suitability: How released artifacts, license terms, resource requirements, and operational responsibilities determine whether hosting an open-source foundation model fits a workload.
Hosting a foundation model means running its inference software on infrastructure you select. Before choosing that infrastructure, inspect the released artifacts. A checkpoint contains learned parameters, or weights; it is not necessarily a complete application. A usable release also needs compatible architecture definitions, configuration, preprocessing assets such as a tokenizer, and inference software.
Amazon Bedrock: Custom Model Import: How to check model compatibility, supply supported model artifacts from Amazon S3, configure import permissions, and invoke the imported model through Bedrock.
Custom Model Import brings a supported model trained or fine-tuned outside Amazon Bedrock into Bedrock for managed inference. It is not a general-purpose loader for arbitrary model code. Check the current Custom Model Import documentation for the target AWS Region, supported architecture, model configuration, and artifact requirements before uploading.
Containers: packaging ML workloads into images: How to build an ML workload image with a compatible base image, pinned dependencies, and the startup command needed to run the workload.
An image packages an application's files, dependencies, and startup settings. A container is a running instance of that image. You build an ML workload image from a base image, which supplies an initial filesystem and often a Python runtime or ML framework.
Amazon ECR: managing container image versions: How to authenticate, push and pull workload images in private repositories, identify versions with tags and digests, and retain needed images with lifecycle policies.
Amazon ECR stores container images; it does not run them. A private registry belongs to an AWS account in a Region and contains repositories. For this example, create a repository named model-server and set REGISTRY to 123456789012.dkr.ecr.us-east-1.amazonaws.com and REGION to us-east-1. With a local image already built, give it its destination name: docker tag model-server:local $REGISTRY/model-server:v1.
Tool Calling: the request–execution–result loop: How tool definitions let an agent request external operations that application code validates, authorizes, executes, and returns to the model.
A tool definition tells a supported model which external operation it can request. It supplies a name, a description of when to use the tool, and an input schema describing argument names, types, and required fields. Application code separately implements the operation.
Model Context Protocol: connecting agents to external capabilities: How an agent application configures host–client–server connections, discovers negotiated capabilities, and accesses external systems while enforcing permissions outside the protocol.
Model Context Protocol (MCP) standardizes communication between an AI application and external capabilities. The host is the agent application. It manages an MCP client for each server connection; the server exposes capabilities backed by external systems. One host can connect to several servers through separate clients.
Model Context Protocol vs. Tool Calling: How MCP standardizes application-to-server integration, whereas tool calling lets a model propose an operation for the application to execute.
Tool calling lets a model propose an operation by producing a tool name and structured arguments. The application supplies the available tool definitions and handles the model's request. A request such as lookup_order with an order identifier does not itself perform a lookup.
Amazon Bedrock AgentCore: deploying agents to Runtime: How to package and deploy an agent to Runtime, configure its execution role and authentication, and invoke its endpoint with appropriate session handling.
Amazon Bedrock AgentCore Runtime runs your agent application in managed, isolated execution environments. Your code still defines the agent’s instructions, model calls, and tool use. This lesson follows a container deployment: package the application and its dependencies in an ARM64-compatible container image and store it in Amazon ECR.
AI Agents: configuring a bounded task agent: How to configure a deployed agent's action loop to complete a task through authorized tools and protocol-based service connections.
A deployed agent needs a task contract, not just a broad instruction to be helpful. For an order-status agent, define the goal as retrieving an authenticated customer's order and reporting its recorded status and estimated delivery. Define success as having a valid tool result that supports that answer. Changing an address, cancelling an order, and issuing a refund are outside this task.
AI Agents and Tool Calling: task execution versus tool requests: Why a model's request to invoke a tool does not by itself constitute an agent that manages a task through completion.
Tool calling lets a model produce a structured request naming an operation and its inputs. For example, it might request get_order_status(order_id="123"). That output describes work to be done; it does not show that the order system was contacted. The application or runtime must execute the permitted operation before there is an external result.
Right-Sizing and Elasticity: resource fit versus dynamic capacity: How choosing appropriately sized resources differs from adjusting capacity as demand changes, and why elastic workloads can still be oversized.
Right-sizing asks whether the resources assigned to work are an appropriate fit. For an ML inference worker, that includes enough processing power, memory for the model, and network capacity to meet response-time requirements. The right choice is not necessarily the smallest resource: insufficient capacity can cause slow responses or failures.
Quantization: precision choices for foundation model hosting: How to choose a quantization format that reduces hosting memory requirements while meeting model quality targets and hardware and serving-runtime constraints.
Quantization represents model values with fewer bits. FP16 and BF16 use 16-bit floating-point representations; INT8 uses 8-bit integers, while packed 4-bit formats store weights more compactly. Integer quantization commonly uses scales, and sometimes zero points, to map values between representations. Rounding and clipping introduce error: quantization is not lossless compression.
Model Parallelism: configuring a multi-accelerator serving replica: How model partitioning determines a serving replica’s per-device memory needs, accelerator topology, and parallelism configuration.
Model parallelism partitions one model across multiple accelerators. The devices hold different portions of the model and cooperate on its execution. Together, they form one serving replica: a complete allocation capable of serving requests.
Right-Sizing: matching capacity to workload requirements: How representative utilization measurements and load tests guide resource sizing that reduces waste while preserving performance targets and failure headroom.
Right-sizing means choosing resource capacity that meets workload requirements without paying for unnecessary capacity. The goal is not the smallest resource or the highest utilization. First define the required response time, throughput, error rate, or job completion deadline, along with the failures the workload must tolerate.
Amazon EC2: purchasing options: How On-Demand Instances, Spot Instances, Reserved Instances, and Savings Plans differ in cost, commitment, and interruption risk.
An EC2 purchasing option changes how you pay for compute. On-Demand Instances charge for usage without a long-term commitment. They suit experiments, short-lived workloads, and unpredictable demand. Their compute rate is the reference against which purchasing discounts are compared.
Workload Predictability: dependable demand and flexible capacity: How utilization history, operating schedules, and forecast uncertainty identify dependable compute demand that can justify provisioning commitments while keeping uncertain demand flexible.
Workload predictability is confidence in future compute needs, not simply flat traffic. To find dependable demand, examine utilization history across normal operating cycles, including quiet periods and recurring peaks. Compare resource use with request volume, job completion times, and latency so that low utilization is not mistaken for spare capacity when another resource is limiting performance.
Resource Efficiency: demand-aligned ML capacity: How to choose on-demand or provisioned ML capacity by comparing useful throughput, idle consumption, and cost under representative demand while meeting latency and availability requirements.
Demand-aligned ML capacity supplies enough inference capacity when it is needed without paying for unnecessary idle capacity. Compare two models: on-demand inference, where usage drives charges, and provisioned capacity, where you allocate capacity that remains available during the provisioned period.
Infrastructure as code (IaC): composing connected infrastructure: How parameterized infrastructure definitions use dependencies and cross-stack references to provision connected compute and agent-workflow resources repeatably.
Infrastructure as code describes resources and their configuration in version-controlled files. With AWS CloudFormation, a template describes the desired infrastructure, and a stack is a deployed instance of that template. AWS CDK lets you author infrastructure in supported programming languages and synthesize CloudFormation templates.
AWS CloudFormation: connecting infrastructure stacks: How templates provision compute resources and use stack outputs, cross-stack references, and lifecycle events to connect infrastructure deployments with orchestration workflows.
A CloudFormation template describes desired infrastructure in YAML or JSON. Its Resources section can declare an AWS::EC2::Instance with properties such as its image ID, instance type, subnet ID, and security groups. A stack is a deployed instance of that template, managed through creation, updates, and deletion.
Event-Driven Architecture: event-triggered workflows: How resource lifecycle events trigger independent provisioning workflows, using event filtering and correlation to decouple infrastructure stacks from orchestration consumers.
A resource lifecycle event reports a change that has happened, such as a stack finishing creation. Instead of making that stack call every downstream workflow, publish the fact and let independent consumers react. The stack does not need to know which consumers exist.
Amazon EventBridge and AWS Step Functions: routing versus orchestration: When to use EventBridge to route workflow-triggering events versus Step Functions to coordinate stateful, multi-step execution.
Amazon EventBridge answers, “Who should react to this event?” An event describes something that happened, such as a dataset becoming ready. EventBridge matches events against rules and routes matching events to targets. Producers do not need to know the consumers' workflow logic.
Amazon EventBridge: event rules and workflow targets: How event bus rules match AWS and custom events and invoke workflow targets using input mapping, invocation permissions, and delivery retries.
An event bus receives events; its rules select which events reach targets. AWS service events arrive on the default event bus. Custom applications publish with PutEvents to a default or custom bus, supplying Source, DetailType, and JSON Detail. In the received event, these appear as source, detail-type, and detail.
AWS Step Functions: coordinating AWS service tasks: How state machines sequence service API calls, pass task results, and handle waiting and retries for asynchronous resource provisioning and knowledge-base refresh jobs.
An AWS Step Functions state machine defines tasks and the transitions between them. An execution runs that definition with its own input and progress. A Task state can call a supported AWS service API directly through an integration, without a Lambda function that only forwards the request.
AWS Deep Learning Containers: building and maintaining custom images: How to choose a compatible framework base image, extend it with pinned workload dependencies, and rebuild and test it when updates become available.
AWS Deep Learning Containers (DLCs) are prebuilt container images containing a deep learning framework and supporting libraries. Use one as the base image for your custom image rather than assembling the framework stack yourself. Start with the official DLC available-images documentation to find a supported image URI for your AWS Region and intended runtime.
Amazon Inspector and Amazon ECR: enhanced versus basic image scanning: How ECR basic scanning differs from Inspector-powered enhanced scanning in vulnerability coverage and support for continuous scanning.
Amazon ECR image scanning checks software packages in stored container images for known vulnerabilities. For images in private repositories, ECR offers basic scanning and enhanced scanning. The choice changes both what software is checked and how scanning can continue after an image is pushed.
Containers: updating vulnerable image dependencies: How to replace vulnerable base images and dependencies by rebuilding and testing a replacement image rather than patching running containers.
A container image packages application files and dependencies. A running container uses that image plus its own writable layer. Installing a fixed package inside one running container changes that container, not the image stored in your registry. Other replicas remain unchanged, and a replacement container started from the original image still contains the vulnerable package.
Immutable Infrastructure: replacing ML workloads with versioned container images: How to maintain ML workload containers by rebuilding and testing images with pinned dependencies, deploying replacements by image digest, and keeping persistent state and secrets outside the images.
Immutable infrastructure means replacing deployed containers when their software changes, rather than installing patches inside running containers. An interactive package update changes only that container, not the image used for its replacement. Instead, maintain the Dockerfile, application source, and dependency lock files in version control.
Network Isolation vs. Network Segmentation: Why dividing workloads into network segments does not by itself enforce isolation between them.
Network segmentation divides workloads into groups, such as training systems, inference services, and development systems. These groups make different security requirements easier to express and manage. But putting workloads in different network segments does not, by itself, establish which communication is blocked.
Network Isolation: communication boundaries for ML workloads: How VPC, subnet routing, and security group configurations restrict ML workload communication to explicitly approved inbound and outbound paths.
For an ML workload, write down the approved communication first: who can submit inference requests, where model files come from, and which destinations the workload must contact. A VPC provides a private network boundary, and subnets place network interfaces within that network.
Amazon VPC: private subnet networking: How to configure subnet addressing, routing, and security groups to isolate SageMaker workload network interfaces while preserving required AWS service connectivity.
A SageMaker model's VPC configuration identifies subnets and security groups. SageMaker creates network interfaces in those subnets so the model container can reach resources through your VPC. You control the addressing, routes, and traffic rules for those interfaces; you are not moving the entire SageMaker service into your VPC.
AWS PrivateLink: interface endpoints for SageMaker AI: How interface endpoints use private IP addresses, private DNS, security groups, and endpoint policies to provide private access to SageMaker AI API and runtime services from a VPC.
AWS PrivateLink lets an application in your VPC reach SageMaker AI through interface VPC endpoints. Each endpoint creates network interfaces with private IP addresses in your selected subnets. These calls do not require public IP addresses, a NAT gateway, or an internet gateway.
AWS CLI: scripting service API workflows: How JSON command inputs, response queries, and waiters connect SageMaker API calls into a repeatable model-hosting script.
The AWS CLI turns commands into service API requests. For SageMaker model hosting, a script creates a model, an endpoint configuration, and an endpoint. Before running it, configure credentials and a consistent Region. The caller needs SageMaker permissions and permission to pass the model’s execution role; that role lets SageMaker access the model’s assets.
AWS SDKs: programmatic model deployment: How Boto3 service clients and SageMaker Python SDK abstractions express a model-hosting workflow, supply deployment parameters, and track asynchronous completion.
Boto3, the AWS SDK for Python, exposes service operations through clients. For model hosting, sm = boto3.client('sagemaker', region_name=region) creates a management client. Your code calls operations such as create_model, create_endpoint_config, and create_endpoint, supplying their request fields explicitly. Choose this interface when you need direct control over service requests and orchestration.
AWS Tools and SDKs: model deployment with Python SDKs: How Boto3 and the SageMaker Python SDK submit model-hosting API requests, track asynchronous deployment, and handle deployment errors.
Boto3 exposes AWS API operations directly. With sm = boto3.client('sagemaker'), your Python program supplies request parameters and calls operations such as sm.create_model(...). Boto3 handles request serialization, signing with your AWS credentials, and sending requests to the selected Region.
Resource Utilization: bottleneck-aware scaling signals: How resource-specific utilization patterns reveal ML workload bottlenecks and determine which metrics reliably reflect demand for additional capacity.
Resource utilization measures how much of a resource's available capacity is being used. For ML workloads, examine CPU, GPU, memory, storage, and network separately. Low CPU utilization does not mean an inference endpoint has spare capacity if its GPU is saturated.
AWS Auto Scaling: target tracking for ML capacity: How target-tracking policies scale GPU-backed ML workloads using suitable per-replica metrics, capacity bounds, and cooldowns that account for model startup time.
Target tracking adjusts replica count to keep a load metric near a chosen target. When load per replica rises, it adds capacity; when load stays low, it can remove capacity. It manages a target rather than requiring you to choose every scaling increment.
Semantic Search: embedding-based retrieval pipelines: How to configure a passage-retrieval pipeline with compatible embeddings, metadata filters, and retrieval settings that meet relevance and latency requirements.
A passage-retrieval pipeline has two paths. Ingestion prepares searchable passages before a request arrives. Query-time retrieval embeds a question and searches those stored passages; it does not re-embed the document collection for every request.
Hybrid Search: combining lexical and vector retrieval: How to retrieve candidates from aligned text and vector indexes, apply consistent filters, and fuse their rankings without letting incompatible score scales distort relevance.
Hybrid search retrieves candidates through lexical and vector searches, then combines their rankings. Both searches must refer to the same searchable units. When you split a guide into passages, index each passage's text, embedding, metadata, and stable chunk ID. A document ID alone cannot distinguish several passages from that document.
Hybrid Search vs Semantic Search: Why semantic-only retrieval and hybrid retrieval behave differently when queries combine exact identifiers with natural-language intent.
Consider the query, “How do I fix error E1047 after rotating database credentials?” It contains an exact identifier, which distinguishes one error from others, and natural-language intent, which describes the help the person needs.
Conversation Memory: maintaining conversation state: How applications load, update, and retain user-scoped conversation state while selecting relevant history for each model invocation.
Conversation memory is state retained between turns so an application can supply useful history to its next model request. In a typical inference workflow, the model uses the context supplied for that invocation; it does not automatically recall earlier requests. Supplying history does not train the model or change its weights.
Checkpointing: resuming agent workflows: How durable checkpoints preserve agent execution state under stable identifiers and support safe resumption through reconciliation or idempotent tool actions.
A durable checkpoint records enough execution state for another worker to continue an agent workflow after a failure. It must survive the failure being handled: state kept only in a worker's memory or temporary files does not survive losing that worker.
Checkpointing and conversation memory: Why retaining conversational context does not necessarily preserve the execution position and pending actions needed for workflow recovery.
Conversation memory preserves information that helps an assistant understand later turns. It can retain earlier messages, a summary, or facts such as the user's preferred language. It answers, “What context does the model need to understand this request?”
Amazon ElastiCache: shared session state: How Valkey or Redis OSS holds shared agent session state using session keys, atomic updates, and expiration, including the effects of eviction and failover.
An agent's session state is the working context it needs between requests: conversation summaries, a current task, or completed tool steps. Keeping that context only in one worker's memory ties the session to that worker. Amazon ElastiCache for Valkey or Redis OSS lets different workers use the same in-memory state.
Amazon ElastiCache vs Amazon DynamoDB: choosing a state store: How ElastiCache and DynamoDB differ in latency, durability, and state lifecycle when choosing where to store agent state.
Agent state is information an agent carries between actions: recent conversation context, intermediate tool results, or a checkpoint describing completed work. Choose its store by asking how quickly it must be read and what happens if it disappears. Frequently accessed state is not necessarily disposable state.
Elasticity: demand-responsive capacity control: How scaling policies match GPU workload capacity to demand while accounting for provisioning delays, safe scale-in, and cost and performance limits.
A GPU scaling policy needs a signal that shows whether workers can keep up. Demand signals describe arriving or waiting work, such as queued requests per ready worker or the age of the oldest waiting job. Resource signals describe the workers: GPU utilization measures processing activity, while GPU memory utilization measures occupied device memory.
Amazon EC2 Auto Scaling vs AWS Auto Scaling: When to use EC2 fleet management directly through Amazon EC2 Auto Scaling versus cross-service scaling plans through AWS Auto Scaling.
Amazon EC2 Auto Scaling manages fleets of EC2 instances through Auto Scaling groups. It launches and terminates instances to maintain capacity and replaces instances that fail health checks. Choose it directly when your work is about operating an EC2 fleet, including its launch settings, instance lifecycle, and scaling policies.
Amazon Bedrock AgentCore: operational telemetry with Observability: How to instrument agent executions and use traces, logs, and metrics in CloudWatch to diagnose coordination, streaming, and tool failures and analyze runtime resource consumption.
AgentCore Observability integrates agent telemetry with Amazon CloudWatch. Runtime metrics and application output do not, by themselves, describe every reasoning step or tool call. Use supported OpenTelemetry instrumentation, such as AWS Distro for OpenTelemetry (ADOT), to capture agent, model, and tool spans. ADOT instruments application operations; CloudWatch receives and analyzes the telemetry.
Multi-Agent Orchestration: coordination failure handling: How correlated execution traces and completion states detect failed handoffs, truncated streams, and tool failures so orchestration can trigger bounded retries or escalation.
A multi-agent task can stop between delegation, tool execution, and result delivery. A correlated execution trace connects these boundaries: carry a workflow run ID and task ID through every handoff, then record an attempt ID and parent-child span relationships. This lets you distinguish a retry from a different task and locate the last confirmed action.
AWS CodeDeploy vs AWS CodePipeline: deployment execution and release orchestration: How CodeDeploy's responsibility for executing deployments differs from CodePipeline's responsibility for coordinating release stages.
AWS CodePipeline coordinates a release workflow. Its stages and actions describe how a change moves through activities such as source retrieval, testing, approval, and deployment. It invokes the configured action providers and tracks their results.
AWS CodeDeploy: deployment configuration and lifecycle: How deployment groups, permissions, and AppSpec hooks govern artifact deployment from a pipeline, and how lifecycle events reveal configuration failures.
A pipeline deployment needs both a revision and a destination. In this EC2 example, the revision is an archive containing application files, scripts, and an AppSpec file. The pipeline stores its artifacts in Amazon S3, and its deploy action names a CodeDeploy application and deployment group.
Blue-Green Deployment: automated cutover and rollback: How a pipeline validates a replacement inference environment, switches production traffic, and uses monitoring gates to trigger rollback while preserving data and dependency compatibility.
Blue-green deployment keeps the current inference environment, blue, available while a replacement, green, is prepared. A stable production entry point sends requests to the active environment. The colors describe release roles, not permanent infrastructure identities.
Canary Deployment: automated traffic promotion and rollback: How a pipeline limits live traffic to a candidate model and uses version-specific health and model-quality criteria to gate promotion or redirect traffic to the stable version.
A canary deployment lets a candidate model serve a small share of live requests while the stable model serves the rest. For example, an initial weight split could be 10% candidate and 90% stable. These are routing proportions, not a guarantee of exactly that split in every short interval.
Blue-Green Deployment vs Canary Deployment: How blue-green separates release environments while canary limits initial traffic exposure, and why the two strategies can be combined.
Blue-green deployment separates the current release from its replacement. Blue serves production while engineers prepare and validate green in a separate release environment. A classic blue-green cutover then switches production traffic to green. The colors name roles, not permanent versions.
AWS CodeDeploy: rollout strategies and rollback: How compute-platform support determines rollout and traffic-shifting options, with health checks and CloudWatch alarms controlling automatic rollback.
AWS CodeDeploy does not offer the same rollout choices everywhere. On the EC2/On-Premises compute platform, an in-place deployment updates software on existing hosts. Its deployment configuration controls how many hosts can be updated while maintaining the required healthy capacity. This is host-by-host rollout control, not percentage-based request routing.
AWS CodePipeline vs AWS CodeBuild: orchestration and build execution: How CodePipeline's coordination of release actions differs from CodeBuild's execution of build and test commands, and when to use each.
AWS CodePipeline coordinates a software release workflow. Its stages and actions describe how a change moves from source through activities such as building, testing, approval, and deployment. It tracks action results and controls when dependent work can proceed.
AWS CodeCommit: repositories as CI/CD sources: How repository access, branch selection, and commit events support CI/CD source integration, and how to troubleshoot authentication failures or missing source updates.
AWS CodeCommit hosts Git repositories. Developers push commits to it; a CI/CD source action retrieves a revision for later stages. These operations use different identities: a successful developer push does not prove that the pipeline can read the repository.
AWS CodeConnections: authorizing repository access: How provider authorization, connection readiness, and consuming-service IAM permissions work together to enable or block repository access from CodePipeline and CodeBuild.
AWS CodeConnections connects supported Git providers to AWS services that consume repository content or events. A consuming service references a connection by its ARN. The connection is not a copy of the repository, and knowing its ARN does not grant access.
AWS CodeBuild: build project configuration: How a build project's source, runtime environment, and service role determine whether a pipeline build can start and access its inputs.
A CodeBuild project is reusable configuration for build runs. Its source identifies the build input, its environment determines where commands run, and its service role supplies AWS permissions. A pipeline can invoke the project successfully while the build still fails to prepare its environment or download its input.
AWS CodeBuild: buildspecs and automated tests: How buildspec phases execute build and ML test commands, publish outputs and test reports, and surface command failures in build logs.
A buildspec is a YAML instruction file that tells AWS CodeBuild which commands to run and which files to collect. By default, CodeBuild looks for buildspec.yml in the source root. Use version: 0.2 so commands can share shell state, such as a directory changed by an earlier command.
AWS CodePipeline: configuring release pipeline execution: How to configure and troubleshoot a release pipeline through source triggers, action ordering, artifact handoffs, and permissions for integrated services.
A pipeline execution processes a source revision through configured actions. For a CodeCommit source, configure the repository and branch, then use an EventBridge rule to start the pipeline for matching repository changes. The rule's target role needs permission to start that pipeline. Disable source polling when using event-based detection to avoid duplicate executions.
Unit Testing: deterministic tests for ML application code: How to build repeatable tests of ML application behavior using controlled dependencies and assertions, and make their failures block CI pipeline promotion.
A deterministic unit test checks a small behavior with known inputs and an expected result that stays the same across runs. In an ML application, that behavior might be feature calculation, prompt assembly, or inference-response parsing. Keep this logic separate from network calls and runtime handlers so the test can exercise it without deploying infrastructure.
CI/CD: automated validation gates: How to place code tests and ML or AI evaluation checks in pipeline stages, define pass criteria, and block promotion when validation fails.
An automated validation gate makes a successful check a requirement for reaching a later pipeline stage. Put fast code checks early, evaluate the candidate after it is available, and allow production promotion only after every required gate succeeds.
Champion/Challenger Testing: promotion gates for retrained models: How retraining pipelines use fair baseline comparisons and predefined acceptance gates to promote a challenger or retain the champion.
Champion/challenger testing decides whether a candidate model deserves to replace an accepted model. The champion is usually the production model, but it can be an approved baseline before the first deployment. A challenger is a candidate replacement, perhaps trained on newer data or built with revised features, hyperparameters, or an algorithm.
Data Provenance: linking data history to model versions: How provenance records link each model version to its exact source datasets and processing history for reproducibility and audits.
Data provenance connects a model to the data it used and the work that produced that data. For reproducibility, two kinds of evidence matter: artifact identity, which identifies exact inputs and outputs, and execution history, which records how those artifacts were produced. A dataset name such as customer-data-latest is not enough because its contents can change.
Prompt Templates: managed template lifecycle: How to manage parameterized prompt templates as versioned assets that applications can validate, pin, and roll back.
A prompt template combines fixed instructions with named variables that an application supplies at runtime. Amazon Bedrock Prompt Management lets teams manage these prompts as reusable resources instead of copying prompt text into every application.
Iterative Prompt Refinement: evaluating prompt revisions: How to improve managed prompts through targeted revisions, repeatable tests, and version comparisons that determine whether a change is ready for release.
Iterative prompt refinement improves a prompt through measured changes, not just better-sounding answers. Start with a baseline: the current prompt and its observed results. Identify a specific failure, describe the behavior you want instead, and propose one focused change.
CI/CD: versioned agent release pipelines: How a pipeline binds agent code, configuration, and dependencies into a traceable release, promotes that version across environments, and restores an earlier version when needed.
An agent release is more than a copy of its code. Its behavior also depends on prompts, tool definitions, model settings, and software libraries. A release manifest is a record that binds these inputs to one release ID, such as R17. It links the source commit, packaged artifact, configuration revision, dependency lockfile, and pipeline execution.
Fine-Tuning: versioned model releases: How immutable versions linking the base model, training data, configuration, and adapted artifacts enable reproducible deployment, promotion, and rollback.
A fine-tuned model release is more than a file named model-latest. An immutable release has a unique identity whose model contents and dependency references do not change. Its release manifest, a record describing the release, links the exact base model, training-data snapshot, training configuration, and resulting adapted artifacts.
Incremental Processing: change-aware knowledge base refreshes: How tracked document versions, checkpoints, and replay-safe chunk replacement keep a RAG index current without reprocessing unchanged content or retaining obsolete chunks.
A retrieval-augmented generation, or RAG, index holds searchable chunks derived from source documents. After an initial load, incremental processing refreshes only the documents or chunks affected by changes. A scheduled refresh can be incremental; an event-triggered full rebuild is not.
Amazon CloudWatch: agent execution traces: How instrumented agent execution traces expose tool failures, coordination breakdowns, and incomplete streaming within individual requests.
An agent execution trace connects the recorded work for one request: agent decisions to invoke operations, model calls, tool calls, and handoffs between agents. Each timed operation is a span. Its name, timing, status, and recorded attributes help you locate where execution stopped progressing as expected.
Distributed Tracing: interpreting workflow traces: How connected spans reveal slow or failing stages in data-processing and inference workflows, accounting for concurrent operations and gaps in trace context.
A trace records operations from one execution of a distributed workflow. Each span represents an operation, such as validating records, fetching features, or calling a model. A span records timing and can include status, error events, and attributes that help you investigate that operation.
Data Drift: monitoring input distributions: How baseline comparisons, feature-appropriate statistics, and monitoring windows reveal meaningful input shifts that warrant investigation rather than automatic retraining.
Data drift is a change in the statistical properties of inputs relative to a reference distribution. A monitor compares recent inference inputs with a baseline, often training data or a validated period of production traffic. Valid field names and data types are not enough: employment categories can remain valid while their proportions change.
Hypothesis Testing: statistical evidence for model improvements: How prespecified tests, uncertainty, and effect sizes determine whether observed model improvements provide reliable evidence for deployment.
A higher measured score does not automatically mean a better model. Outcomes vary between samples, so hypothesis testing asks whether an observed difference provides evidence against a specified claim. Define the effect as candidate minus current model on a metric where higher is better. For a one-sided superiority test, the null hypothesis is that the effect is zero or negative; the alternative is that it is positive. A two-sided test instead looks for a difference in either direction. Choose the direction before examining results.
A/B Testing: controlled production experiments: How to compare model variants using randomized production traffic, predefined outcome metrics, statistical uncertainty, and operational guardrails.
An A/B test compares a current variant A with a candidate B using randomized production traffic. Run them during the same period, keep unrelated settings stable, and define the change being tested. If both the model and prompt change, the result measures that combined change, not either change separately.
Hypothesis Testing vs. A/B Testing: How A/B testing creates a randomized comparison while hypothesis testing evaluates the statistical evidence from its results.
A/B testing and hypothesis testing are complementary, not competing methods. A/B testing creates a randomized comparison between alternatives. Hypothesis testing evaluates the statistical evidence in measured results.
Trajectory Evaluation: execution-path checks: How to evaluate correlated execution traces against required steps and dependencies to detect coordination failures, distinguish decision errors from tool failures, and flag incomplete execution automatically.
Trajectory evaluation checks the observable path an application took, not just its final answer. A refund confirmation can sound correct even when the agent skipped approval. The evidence includes tool selections, inputs, results, handoffs, retries, and termination events—not the model’s private internal reasoning.
AWS X-Ray: distributed request tracing: How OpenTelemetry instrumentation and sampling produce traces whose service maps and segment timings reveal latency bottlenecks and errors across application dependencies.
AWS X-Ray assembles recorded work into a trace: the connected operations for one request. OpenTelemetry instrumentation creates spans with start and end times, parent relationships, and attributes. Automatic instrumentation covers supported frameworks and clients; custom spans describe application work it cannot see.
Amazon Managed Service for Prometheus: querying metrics for dashboards: How to query workspace metrics with PromQL and authorize Grafana to use those queries in performance dashboards.
An Amazon Managed Service for Prometheus workspace stores time series: timestamped samples identified by a metric name and labels. This lesson starts with metrics already ingested. PromQL selects and calculates values from those series; Grafana displays the results.
Amazon Managed Grafana: performance dashboards: How to query connected metric data sources and configure dashboard panels to visualize ML infrastructure performance over time.
An Amazon Managed Grafana dashboard contains panels, and each panel queries a connected data source. The metrics remain in that source; creating a panel does not collect missing metrics. Before editing queries, verify that the connection works and that the workspace's data-source credentials have permission to read the metrics.
Amazon EC2 Auto Scaling: maintaining efficient fleet capacity: How Auto Scaling groups use capacity limits, demand-based policies, and instance allocation to maintain reliable EC2 capacity without unnecessary cost.
An Auto Scaling group manages EC2 instances as one fleet. Its minimum capacity sets the floor, desired capacity is the amount it tries to maintain, and maximum capacity limits how far scaling policies can grow it. With minimum 2, desired 4, and maximum 8, the group initially works toward four instances—not eight.
Failover: capacity for Availability Zone failures: How to retain enough surviving capacity to take over a failed zone's workload, balancing redundancy costs against recovery readiness without assuming scaling is instantaneous.
Failover capacity is the capacity still available to do useful work after a failure. Spreading instances across Availability Zones protects their placement, but does not prove that the survivors can handle the workload. For immediate takeover, the ready capacity outside any one failed zone must cover the demand you intend to support.
AWS Billing and Cost Management: workload spending controls: How workload cost analysis informs optimization and budget thresholds, including why alerts and supported budget actions cannot guarantee a hard spending cap.
Workload cost analysis starts by defining which charges belong to the workload. In AWS Cost Explorer, filter and group historical costs by linked account, service, Region, and activated cost allocation tags. Compare equivalent periods to locate a change, then separate increased demand from increased cost per unit of work. Include an agreed share of shared infrastructure; a workload tag alone does not capture every related charge.
Resource Tagging: cost allocation tags: How consistent resource tags become activated billing dimensions for attributing eligible ML and AI costs and filtering budgets, including coverage gaps and processing limits.
For ML cost reporting, choose a small set of business labels such as CostCenter=CC104, Project=Forecasting, and Environment=Production. Define approved spelling, allowed values, and who maintains them. Tag keys and values are case-sensitive: Project and project create separate keys, while Forecasting and forecasting split values. Use deployment templates and provisioning workflows to apply the standard consistently.
Cost Allocation: attributing ML workload spending: How account boundaries and activated cost allocation tags group ML spending by owner or workload for cost analysis and budget tracking, while keeping unmatched charges visible.
Cost allocation assigns spending to an owner or workload. For an ML workload, that can mean bringing training, inference, storage, and supporting service costs into one financial view. Start with a clear ownership rule: which team pays for each account, and which workload names will be used consistently?
Cost Allocation vs Resource Tagging: Why resource tagging supplies metadata while cost allocation assigns billed expenses to financial owners, so tagging alone does not ensure complete cost attribution.
Resource tagging adds metadata: key-value labels that describe a resource. For example, Application=Forecasting identifies a workload and Environment=Production describes its environment. These labels can help people find and manage resources without making any financial decision.
AWS Cost Explorer: cost and usage analysis: How filtering, grouping, and forecasting cost and usage data reveals ML spending drivers and opportunities to reduce costs.
AWS Cost Explorer helps you explore historical AWS cost and usage data. Start with a date range: monthly views reveal longer-term trends, while daily views help locate spending spikes. An ML workload can incur charges for SageMaker, EC2, storage, and other services, so looking only at SageMaker can miss part of its cost.
AWS Cost and Usage Report: granular cost attribution: How to use report line items, resource identifiers, and activated cost allocation tags to attribute ML infrastructure spending and identify cost optimization opportunities.
The AWS Cost and Usage Report (CUR) breaks spending into billing line items rather than giving one total per ML workload. A training workflow can generate separate charges for compute, storage, requests, and data transfer. One resource can also appear in many rows across time and usage types. CUR delivers report files to Amazon S3 for analysis, including SQL analysis with Amazon Athena.
AWS Cost and Usage Report vs AWS Cost Explorer: When detailed cost and usage exports for custom analysis are needed instead of Cost Explorer's interactive cost analysis.
AWS Cost Explorer is the starting point for interactive cost analysis. It lets you explore spending with built-in charts, filters, and groupings without preparing a separate dataset. For example, you can investigate whether an increase in ML spending came from compute or storage.
AWS Budgets: threshold-based spending controls: How scoped cost and usage budgets drive alerts and optional budget actions at actual or forecast thresholds without enforcing hard, real-time spending caps.
AWS Budgets compares selected costs or usage against a planned amount over a budget period. A cost budget measures money; a usage budget measures consumption, such as instance hours. Neither is a reservation of capacity or a hard spending cap.
AWS Budgets vs AWS Cost Explorer: When to use AWS Budgets for threshold-based spending oversight rather than AWS Cost Explorer for analyzing spending patterns and savings opportunities.
AWS Budgets is the choice for threshold-based spending oversight. Start with a spending target, then configure notifications so an owner knows when spending needs attention. For an ML team with a monthly spending target, this replaces repeatedly opening a report to check progress against that target.
Pay-as-You-Go Pricing: metered ML infrastructure costs: How billing units, idle capacity, and retained resources determine usage-based costs for intermittent or uncertain ML workloads.
Pay-as-you-go pricing charges for measured resource consumption rather than infrastructure purchased for anticipated demand. For intermittent ML experiments or uncertain inference traffic, this lets you provision resources as needed without a standard long-term usage commitment. It does not mean that every service charges only when a prediction or training step succeeds.
Commitment Discounts vs Pay-as-You-Go Pricing: How a term obligation differs from paying only for consumption, including why no-upfront commitments still carry unused-spend risk.
Pay-as-you-go pricing charges for measured consumption without a long-term usage commitment. For example, standard On-Demand compute charges follow billable runtime, subject to the service's billing rules. You do not promise to keep buying that compute for a term.
Commitment Discounts: matching commitments to predictable usage: How eligibility rules, conservative usage baselines, and utilization determine whether a commitment saves money on compute and ML workloads.
A commitment discount applies only to usage that meets its eligibility rules. Start with the billed resource, not the application's purpose: model training on Amazon EC2 produces EC2 usage, while training with Amazon SageMaker produces SageMaker usage. Both perform computation, but they do not qualify for the same commitments.
Savings Plans: choosing an hourly commitment: How plan eligibility, discounted hourly rates, term and payment options, and predictable usage determine an appropriate commitment for ML workloads.
Savings Plans exchange a spending commitment in dollars per hour for discounted rates on matching usage. They change billing, not resource performance, and do not reserve capacity. For ML workloads, first identify where the compute runs: an EC2 training instance and a SageMaker AI training instance do not use the same plan coverage.
Tokenization: inference token budgets: How to measure input and output token usage and control token budgets without sacrificing essential context or answer quality.
A token budget is an allowance for the input a model receives and the output it generates. Tokens are not words: punctuation, code, and different languages affect counts. For a reliable preflight count, use the selected model’s tokenizer or a provider-supported counting interface, rather than a words-to-tokens estimate.
Usage-Based Pricing: foundation model inference meters: How token-based and provisioned-capacity billing translate production inference demand into costs, including input/output rates, capacity utilization, and supporting resource charges.
For text models using token-based billing, request count alone does not determine inference cost. A token is a piece of text, not necessarily a word. Input tokens include instructions, conversation history, user messages, and retrieved context sent to the model. Output tokens are the response it generates. A short new message can therefore accompany a large input if the application resends a long conversation.
AWS Pricing Calculator: inference cost estimates: How to model production foundation model inference costs using supported service pricing dimensions and consistent usage assumptions, while identifying charges the estimate excludes.
AWS Pricing Calculator converts service configurations and usage assumptions into planning estimates. Start by adding the inference service and selecting the deployment Region. For Amazon Bedrock, check the model and inference options available in the calculator. Only use pricing dimensions that it supports; verify missing options against the service pricing documentation rather than treating them as free.
Caching: reusing foundation model inference work: How caching prompt prefixes or inference responses reduces foundation model costs while preserving freshness and keeping results isolated between users.
Caching reduces foundation model costs by reusing work instead of repeating it. A cache hit finds reusable work; a cache miss requires new work. For inference, distinguish reusing the processing of input from reusing a finished answer.
Vector Quantization: compressed vector index trade-offs: How codebook-based vector compression changes index memory and storage costs, and how to measure retrieval quality and rescoring overhead against an uncompressed baseline.
Vector quantization replaces a vector with a compact identifier for a representative vector in a codebook. Codebooks are learned from representative embedding data. This is lossy compression: the representative usually differs from the original, so estimated distances and neighbor rankings can change.
Amazon CodeGuru and Amazon Inspector: source code analysis versus vulnerability scanning: When to use CodeGuru for source code security analysis versus Inspector for software vulnerabilities in supported workloads and container images.
Amazon CodeGuru and Amazon Inspector address different security questions. For source code security analysis, CodeGuru Reviewer examines supported source code and recommends changes to potentially unsafe coding patterns, such as code that handles untrusted input insecurely. CodeGuru Profiler analyzes runtime performance; it is not the source code security review tool.
Amazon CodeGuru: security reviews in development workflows: How CodeGuru Reviewer analyzes source code during pull request reviews and provides security recommendations developers can use to fix vulnerable code before merging.
Amazon CodeGuru Reviewer analyzes source code and recommends improvements, including fixes for potential security vulnerabilities. In a pull request workflow, it gives developers feedback while a change is still under review, before that change reaches the shared branch.
Static Application Security Testing: CI pipeline integration: How CI pipelines scan application code and prevent deployment when static-analysis findings violate security policy or analysis fails to complete.
Static Application Security Testing (SAST) examines application code without executing the application under test. Depending on the analyzer, it reads source code, intermediate representations, or compiled artifacts. It can identify weaknesses such as untrusted input reaching a database query through unsafe string construction.
Amazon Inspector: container image vulnerability scanning: How Inspector scans ECR images for vulnerable packages and provides severity-ranked findings that CI/CD pipelines can use to block unsafe releases.
Amazon Inspector identifies known vulnerabilities in supported operating system packages and programming language packages inside container images stored in Amazon ECR. It examines image contents; the container does not need to be running.
Security Quality Gates vs. Vulnerability Assessment: Why discovering and reporting vulnerabilities is different from enforcing a decision about whether a change may advance.
Vulnerability assessment asks, “What security weaknesses were found?” It examines a defined scope, such as application code or a container image, and produces findings. Those findings describe weaknesses and help people understand what needs attention.
Security Quality Gates: enforcing pipeline promotion policies: How a pipeline evaluates completed code and image scans against acceptance rules to permit, block, or require approval for promotion of the exact artifact assessed.
A security quality gate makes promotion depend on completed security checks and explicit acceptance rules. For a container release, the pipeline needs both code-level evidence and image vulnerability evidence: checking source code does not establish that the image's operating-system packages are acceptable.
AWS IAM vs AWS STS: identity configuration and credential issuance: How IAM's responsibility for identities, trust, and permissions differs from AWS STS's responsibility for issuing temporary security credentials.
AWS Identity and Access Management (IAM) manages identity and access configuration. You use it to create users and roles and define their access policies. AWS Security Token Service (AWS STS) issues temporary security credentials for authorized requests.
AWS IAM: least-privilege policies and access evaluation: How IAM policy statements and evaluation rules determine access to ML artifacts and services, including how to diagnose permission denials.
Least privilege means granting only the actions, resources, and request conditions a task needs. For an ML workload, reading training data, writing model artifacts, and invoking an endpoint are separate permissions. An identity-based policy attached to a role defines permissions for that role; attaching a policy to a group gives those permissions to its IAM users.
AWS IAM: roles and workload credentials: How role trust policies establish workload identities and how to choose role credentials or IAM user credentials for ML applications, including when IAM authentication is appropriate instead of Bedrock API keys.
An IAM role is an identity that a workload can assume without owning permanent access keys. Its trust policy defines which principal may assume it and under what conditions. A principal can be an AWS service, another AWS identity, or a federated identity. Trust does not turn arbitrary application code into an authorized workload: the caller must match the trusted principal and satisfy the applicable conditions.
AWS KMS: Key policies and grants: How key policies, IAM permissions, grants, and policy conditions restrict which workload roles and AWS services can use a KMS key to protect encrypted artifacts.
An encrypted model or training dataset has separate access controls for the artifact and its KMS key. For example, reading an S3 object encrypted with SSE-KMS normally requires both s3:GetObject permission and kms:Decrypt permission. Permission to read the object does not automatically authorize decryption. This lesson uses a customer managed symmetric KMS key, whose access controls you can configure.
Least privilege: scoping ML artifact access: How to restrict ML workload roles to required artifact operations and resources across SageMaker, S3, and KMS, and verify that unrelated access is denied.
Least privilege starts by separating the identity that submits a SageMaker job from the execution role used by that job. The submitter needs the required SageMaker operations, such as sagemaker:CreateTrainingJob, scoped to supported job resources. It also needs iam:PassRole on the approved execution role, restricted with iam:PassedToService set to sagemaker.amazonaws.com.
Attribute-Based Access Control: project-scoped permissions: How policies match trusted principal and resource tags to restrict access to ML artifacts, including protecting authorization tags and checking action-level support.
Attribute-Based Access Control (ABAC) uses attributes in policy conditions to restrict access. For ML artifacts, a shared policy can permit selected operations only when the requester’s project matches the artifact’s project. Tags do not grant access by themselves: an applicable policy must use them.
Cross-Account Access: least-privilege artifact sharing: How source- and destination-account policies authorize narrowly scoped access to ML artifacts through role assumption or resource policies, including separate authorization for KMS-encrypted artifacts.
Cross-account artifact sharing lets an identified consumer read resources owned by another account without making them public. Here, the source account contains the consumer, and the destination account owns the ML artifacts. Network connectivity and membership in the same AWS organization do not grant access.
Access Control: least-privilege roles for ML systems: How role trust and permission policies let users and applications access only the ML resources and operations they need.
Least privilege means giving each person or application only the operations and resources its task needs. An IAM role provides an identity with permissions without requiring permanent access keys. When an authorized requester assumes a role, it receives temporary credentials. Use federated access for people and workload roles for applications rather than embedding long-lived keys in notebooks or code.
Role-Based Access Control: scoped roles for ML workloads: How to map ML responsibilities to least-privilege role permissions and control which users or applications may assume each role.
Role-Based Access Control (RBAC) assigns permissions to responsibilities, then authorizes identities to use those roles. Start with tasks, not a broad service permission such as “SageMaker access.” A training workload, a deployment operator, and an application requesting predictions have different jobs.
AWS STS: assuming roles with temporary credentials: How users and applications assume IAM roles through STS, including caller authorization, role trust, session permission limits, and temporary credential expiration.
To assume a role is to obtain temporary credentials for a role session rather than use the caller's original identity for subsequent work. A user can do this through the AWS CLI, and an application can do it through an AWS SDK. For AssumeRole, the caller signs the request with credentials it already has; these can themselves be temporary credentials.
Workload Identity: execution roles for ML workloads: How role trust and permission policies let ML workloads obtain temporary credentials with only the access they need.
An ML workload needs an identity to call AWS APIs. An execution role is an IAM role that a service uses to perform work, such as reading training data or saving a model. The workload uses temporary role credentials rather than an IAM user's long-lived access keys.
AWS CloudTrail: API activity logging: How event selection and trail configuration capture audit records, and how caller, request, and error fields explain successful and denied API actions.
AWS CloudTrail records supported AWS API activity, including calls from the console, command line, SDKs, and AWS services. An event describes an action, not just a resource's current state. Before depending on a trail for an audit, choose the event categories and filters that cover the actions you need.
AWS CloudTrail vs Amazon CloudWatch: audit activity and operational telemetry: When a question requires CloudTrail API activity records rather than CloudWatch metrics, application logs, or alarms.
AWS CloudTrail provides activity records for auditing AWS actions. Choose these records when you need to establish which identity called an AWS API, which action it requested, and when the request occurred. For example, investigating who requested an update to a SageMaker endpoint calls for API activity evidence, not a performance graph.
AWS Config: resource configuration compliance: How to record supported workload resources, inspect their configuration history, and use AWS Config rules to assess compliance with security requirements.
AWS Config records the configuration of supported resources so you can inspect changes and assess security requirements. Coverage is not automatic for every resource in a workload. Check that each required resource type is supported in the target Region, then include it in the configuration recorder. For example, a workload's security groups use the resource type AWS::EC2::SecurityGroup.
AWS CloudTrail vs AWS Config: activity history and resource configuration: How CloudTrail evidence of API actions differs from AWS Config records of resource configuration and compliance.
AWS CloudTrail records evidence of API actions and other account activity. Use it to investigate who requested an action, what they requested, and when. An event can include the caller identity, API operation, source address, request details, and error information.
Configuration Drift: monitoring approved baselines: How AWS Config records and evaluates supported ML resource configurations against approved baselines, and how recording scope and evaluation timing affect drift visibility.
Configuration drift means that an actual configuration no longer matches an approved configuration. For an ML environment, an approved policy might require SageMaker notebook instances to have direct internet access disabled. This is configuration drift, not a change in model accuracy or input-data distribution.
Log Retention: configuring retention policies: How to translate investigation and compliance requirements into retention settings that keep audit records retrievable for the required duration and control their expiration.
Log retention defines how long records must remain available and when they may expire. Start by identifying the audit events needed for investigations and compliance, including the relevant accounts and Regions. Enabling collection alone does not guarantee that those records will be kept.
Audit Logging: trustworthy audit trails for ML workloads: How to design ML workload audit trails that capture relevant identity and activity evidence and preserve it reliably for investigation and compliance.
An audit trail helps explain who did what, to which resource, when, and with what result. For an ML workload, that could mean identifying who changed an endpoint, which role read training data, or which application approved a model release. Latency metrics and training-loss logs describe operation, but do not replace this evidence.
Effective Permissions: evaluating access for a request: How policy layers and request context determine usable access, including dependent operations, and explain why an apparently allowed workload request is denied.
Effective permissions are the authorization result for a particular principal, action, resource, and request context. An IAM policy containing Allow is evidence of a grant, not proof that the request will succeed. Ordinary IAM authorization starts with an implicit deny: without an applicable grant, access is denied. An applicable explicit deny overrides an allow.
Explicit Deny Precedence: tracing an overriding denial: How to identify the explicit deny that applies to a failed request and determine why it must stop applying before an allow can authorize the request.
In AWS IAM authorization, an explicit deny is a matching policy statement whose Effect is Deny. If it applies to a request, an allow elsewhere cannot authorize that request. A more specific allow, an administrator policy, or a later statement does not override it.
Event Correlation: linking security events across logs: How identity and resource identifiers within explicit time windows connect audit, network, and application events into evidence-backed security sequences for ML workloads without implying causation.
Event correlation links records that may describe the same activity, resource, or sequence. For an ML workload, an API audit record, a network flow record, and a training application's message each show a different part of what happened. Aggregation brings those records together; correlation explains which records appear related and why.
Stateful and Stateless Filtering: request and return traffic: How stateful security groups and stateless subnet ACLs permit intended workload connections and their return traffic without allowing unrelated connections.
A security group filters traffic for associated network interfaces. It is stateful: after it permits a connection, it automatically permits that connection’s return traffic, even if the opposite-direction rules would not independently allow it. This does not permit an unrelated connection started in the reverse direction.
Network Segmentation: enforcing ML workload boundaries: How VPC boundaries, subnet routes, and least-privilege security groups permit required ML workload and endpoint traffic while blocking unwanted access and lateral movement.
Start with a communication requirement: which ML workload must reach which destination, using which protocol and port? Put workloads with different trust requirements into separate VPCs when they need separate network boundaries. Separate VPCs have no private connection by default; any connection you add needs deliberate routing and filtering.
Threat Modeling: attack scenarios for ML and AI workloads: How tracing valuable assets and trust boundaries across an ML workload reveals plausible attacks and turns prioritized risks into preventive and detective security requirements.
Threat modeling connects valuable assets to plausible ways someone could harm them. For an ML workload, assets include training-data integrity, confidential records, model artifacts, prediction quality, and endpoint availability. Start with the business consequence: incorrect predictions can matter even when no data is stolen.
Vulnerability Assessment: ML workload assessment lifecycle: How recurring assessments of ML workload dependencies and configurations produce findings that guide risk-based remediation and verification of deployed fixes.
A vulnerability assessment looks for security weaknesses in an existing ML workload. Assess both dependencies, such as operating-system packages, training libraries, and inference container base images, and configurations, such as access permissions, storage policies, and network exposure. A package scan does not establish that the workload's permissions are safe.
Threat Modeling vs. Vulnerability Assessment: How design-based analysis of plausible abuse differs from assessing existing weaknesses, and why a clean vulnerability assessment does not rule out architectural security risks.
Threat modeling asks how a workload could be abused and what the design should do about it. It uses the workload’s purpose, valuable assets, data flows, and trust assumptions to describe plausible attacks and their consequences. Its outputs include attack scenarios, security requirements, and decisions about remaining risk.
Data Poisoning: protecting AI data integrity: How provenance, controlled ingestion, and independent evaluation prevent or detect malicious manipulation of training data and retrieval sources.
Data poisoning is deliberate manipulation of information an AI system relies on. An attacker can insert examples, change labels or facts, or selectively remove records. Unlike an accidental quality problem, the aim is to influence behavior, although intent can be difficult to establish from the data alone.
Amazon GuardDuty: threat detection for ML workloads: How GuardDuty detects suspicious account and workload activity affecting ML systems and produces findings that guide investigation and mitigation.
Amazon GuardDuty continuously analyzes account and workload activity using threat intelligence, anomaly detection, and machine learning. For ML systems, suspicious activity could involve credentials used by an ML pipeline or malicious network activity from an EC2 training host. GuardDuty detects security threats; it does not assess model accuracy or guarantee detection of poisoned training data.
Amazon GuardDuty and Amazon Inspector: threats versus vulnerabilities: When to use GuardDuty to detect malicious activity versus Inspector to identify software vulnerabilities and unintended network exposure.
Amazon GuardDuty detects potential threats: signs that someone or something may be misusing your AWS environment. Amazon Inspector identifies weaknesses: vulnerable software and network exposure that could allow an attack. The key distinction is evidence of suspicious activity versus a condition that creates risk.
AWS Security Hub: security finding lifecycle: How Security Hub consolidates and prioritizes findings affecting ML workloads and connects finding workflows to automated remediation.
AWS Security Hub CSPM consolidates security findings and security-control results. These capabilities were previously named Security Hub; the enhanced Security Hub adds risk correlation and response capabilities. This lesson follows the CSPM finding lifecycle, where findings become a worklist for investigation and remediation.
AWS Security Hub vs Amazon GuardDuty: How Security Hub's consolidated security posture differs from GuardDuty's threat detection, and when each service is needed.
Amazon GuardDuty answers, “Is activity in this environment suspicious?” It analyzes activity signals using threat intelligence and detection techniques to produce threat findings. For example, it can identify API activity consistent with compromised credentials used by an ML workload.
Temporary Credentials: role-based API authentication: How role-issued credentials and automatic session renewal support foundation-model API access, and when to choose them instead of Amazon Bedrock API keys.
To call a foundation model through Amazon Bedrock, an application needs both authentication and permission. An IAM role defines an identity that an authorized caller or workload can assume. Its trust policy controls who can assume it; its permissions policies define allowed actions, subject to other applicable controls.
Credential Rotation: replacing persistent API credentials: How replacement, consumer cutover, verification, and revocation govern the safe use of persistent credentials for model access.
Credential rotation replaces an authentication secret and retires its predecessor. For model access, persistent credentials can include a long-term Amazon Bedrock API key or an IAM user access key. Use the authentication method supported by the model service and client; these credential types are not interchangeable.
Credential Rotation vs. Temporary Credentials: How explicit replacement of persistent credentials differs from expiration and refresh of temporary credentials when choosing authentication for model access.
Credential rotation replaces a persistent authentication secret and retires its predecessor. For an application accessing a model, creating a new key is not enough: the application must adopt the replacement, and the old key must stop being accepted. Persistent credentials require explicit lifecycle management.
Credential Management: choosing credentials for foundation-model access: How Amazon Bedrock API keys and IAM credentials differ in lifetime, exposure, and renewal requirements, and when to use each.
Amazon Bedrock API keys simplify authentication for supported Bedrock API calls. The client sends the key as a bearer token: possession of the token lets someone use the access it grants. This is convenient for a trusted development tool or a small prototype that accepts an API key.
Amazon Macie: sensitive data discovery in Amazon S3: How Macie uses data identifiers to find sensitive data in S3 and produces findings to guide downstream masking, redaction, or anonymization without modifying the data itself.
Amazon Macie discovers sensitive data in Amazon S3. Its data identifiers define what to look for in object content. Discovery identifies potential exposure; it does not mask, redact, or anonymize the objects.
Data Loss Prevention: sensitive-data enforcement in AI applications: How content inspection and policy-based blocking or redaction prevent sensitive disclosures at AI application boundaries, and where separate access controls are required.
Data Loss Prevention (DLP) protects sensitive information from crossing a boundary where it is not permitted. For an AI application, important boundaries include sending input to a model and releasing a response to a user. A policy identifies protected information, its permitted use or destination, and the action to take when a violation is detected.
AI Guardrails: request and response policy enforcement: How to configure and test input and output checks, including Amazon Bedrock Guardrails, to block prohibited content and protect sensitive data independently of model instructions.
AI guardrails evaluate content against application policy rather than asking the model to police itself. An instruction such as “never reveal personal details” is useful guidance, but it is not enforcement. Configure input checks before inference and output checks before release: an acceptable request can still produce an unacceptable answer.