MLA-C02 Cheat Sheet
Data Preparation for ML and AI
Collect and store data
Read full chapterCheat sheet
Sharp facts the exam loves — scan these before test day.
- A cross join generates combinations rather than matching entity keys
A Cartesian cross join combines every row of one dataset with every row of the other. Use it only when all combinations are intended, such as constructing an explicit candidate grid. For ordinary enrichment, join on the relevant key to avoid an unintended explosion in intermediate data and processing cost.
Trap Selecting a Cartesian cross join to merge customer attributes into transaction rows, which creates combinations instead of matching each transaction's customer.
3 questions test this
- A retailer forecasts daily demand for 500 stores. The sales table has a row only for days on which a store sold something, so days with zero sales are missing. The model needs one row for every store
- An Amazon Redshift query that builds training rows lists the transactions table and the customers table in its FROM clause, separated by a comma. Its WHERE clause filters only on transaction_date. The
- A streaming service has 40,000 active users and a catalog of 25,000 titles. A retrieval model already wrote a candidates table with user_id and title_id that lists 100 titles for each user. A ranking
- Lake Formation blueprints generate repeatable data-lake ingestion workflows
When an existing data lake needs relational database ingestion with minimal custom development, use an AWS Lake Formation database blueprint. The blueprint generates AWS Glue crawlers, jobs, and triggers to load and catalog the data. Choose a database snapshot for a full load or an incremental database blueprint for supported incremental ingestion.
Trap Using an Amazon Kinesis Data Streams stream as a relational extraction workflow, although producers must still extract and publish the database records.
3 questions test this
- An ML team keeps its data lake in Amazon S3 and manages it with AWS Lake Formation. The team must load 60 tables from an Amazon RDS for PostgreSQL database into the data lake every night and catalog t
- A company uses an AWS Lake Formation incremental database blueprint workflow to load 25 tables from an Amazon RDS for MySQL database into its data lake every night. Nobody on the team wrote any of the
- An ML engineer must add 12 append-only tables from a PostgreSQL database to a Lake Formation data lake. The tables have never been loaded. The plan is to run a database snapshot blueprint once for the
- DynamoDB exports extract training data without consuming table read capacity
When extracting a large DynamoDB dataset must not compete with application reads, export the table to Amazon S3 and process the exported data. Export requires point-in-time recovery and does not consume read capacity units. Export and S3 charges still apply, and asynchronous completion should not be treated as a fixed-time guarantee.
Trap Using a parallel table scan to avoid read-capacity consumption, although scan operations consume the table's read capacity.
3 questions test this
- An ML engineer calls ExportTableToPointInTime to copy an Amazon DynamoDB table to Amazon S3 for a weekly training job. The request is rejected because the table has no continuous backups enabled. The
- A subscription service stores 900 million items in an Amazon DynamoDB table that has point-in-time recovery enabled. A churn model needs only the items whose status attribute is ACTIVE, and only 6 of
- A company keeps an Amazon DynamoDB table with point-in-time recovery enabled in its production account. The ML team needs a weekly copy of the table in an Amazon S3 bucket that it owns in a separate a
- An existing DynamoDB export can be reused across Glue processing runs
AWS Glue's DynamoDB export connector can read an existing export from Amazon S3 instead of requesting a fresh table export. Reuse the export when repeated preprocessing experiments should use the same source snapshot. Request a new export when the dataset must reflect later table changes.
Trap Requesting a new table export for every transformation experiment, although the existing S3 export already contains the required snapshot.
3 questions test this
- For three months, an AWS Glue job has read one existing DynamoDB export with dynamodb.export set to s3, so that experiments are comparable. A new churn model must now be trained on orders placed in th
- An AWS Glue job reads an Amazon DynamoDB table with the DynamoDB export connector and dynamodb.export set to ddb. Data scientists run about 20 preprocessing experiments each week. Every run requests a
- A data science team keeps one DynamoDB export in Amazon S3 as the reference snapshot for its AWS Glue preprocessing experiments, which read it with dynamodb.export set to s3. A new bucket-wide S3 Life
- A Glue JDBC connection needs network access as well as database credentials
A Glue connection to a private relational database must use a reachable VPC subnet and appropriate security groups in addition to valid database authentication. Glue attaches network interfaces using the connection's networking configuration. A successful credential check alone does not establish a path to the database endpoint.
Trap Rotating the database password to fix a connection timeout caused by a blocked network path, which does not change routing or security-group rules.
3 questions test this
- An ML engineer configured an AWS Glue JDBC connection with the correct VPC, the database's subnet, and the database's security group. That security group allows the database port only from the applica
- An AWS Glue job must read training data from an Amazon RDS for MySQL database in a private subnet. The Glue connection was created with only the JDBC URL, user name, and password. Every job run fails
- An AWS Glue job runs in a VPC through a JDBC connection and reads a PostgreSQL database in a private subnet without any errors. The job then hangs and times out while writing Parquet output to an Amaz
- DataSync transfers file-based corpora into an existing S3 ingestion location
When a dataset resides on an NFS or SMB file server and must be copied into Amazon S3, use AWS DataSync with the appropriate source and destination locations. These file-server transfers require a DataSync agent. This is file movement; the downstream preprocessing job still performs record parsing and feature transformations.
Trap Using a Glue JDBC connection to copy an SMB document collection, although JDBC connects to database records rather than file shares.
3 questions test this
- A radiology group adds about 2,000 scans to an on-premises NFS share each day and sometimes corrects older files in place on the same share. A nightly training pipeline needs the share's current conte
- An ML engineer must copy a training corpus from an on-premises NFS server to Amazon S3 with AWS DataSync. The engineer created the S3 destination location. When creating the NFS source location, the c
- A support center keeps 3 years of customer call recordings as WAV files on an on-premises SMB file server in its main office. An ML team needs text transcripts in Amazon S3 to train an intent classifi
- Joins enrich matching entities while unions append compatible records
Use a join when transaction rows need attributes from a customer table matched by a key. Use a union when datasets represent additional rows of the same logical schema. Align column meanings and data types before appending records, rather than interpreting a union as an entity match.
Trap Unioning customer profiles with transactions to enrich each transaction, although appending rows does not match customers to their transactions.
3 questions test this
- An ML engineer must union two order datasets. Dataset A has columns order_id, amount_usd, and ts. Dataset B has columns order_id, ts, and amount_cents, which is stored as a string. A first attempt fai
- An ML engineer is building a fraud training set from 50 million transaction rows that each contain a customer_id. A separate customer table has one row per customer with segment, tenure, and region. E
- A company has two clickstream datasets from its European and North American apps. Both datasets have exactly the same columns and data types. Identical rows can be real repeat events and must be kept.
- A left join preserves source examples that lack enrichment matches
When every training example must survive enrichment, make the examples the left side of a left join. An inner join retains only matched keys and can silently change which examples remain. Inspect missing enrichment values and repeated keys because the join type does not itself clean or deduplicate the inputs.
Trap Choosing an inner join solely to add optional profile fields, which removes examples whose profile key has no match.
3 questions test this
- An ML engineer has 2 million labeled examples and adds optional profile fields from a profile table that covers only 60% of the customers. After an inner join on customer_id in an AWS Glue Join transf
- After an AWS Glue job left joins 2 million labeled examples to an optional demographics table on customer_id, 40% of the examples have empty demographic fields. Every example must stay in the training
- A manufacturer trains an anomaly model on 1.5 million labeled sensor windows, of which 4% are anomalies. An AWS Glue job now enriches the windows with maintenance records by using an inner join on mac
- Existing EBS dataset files become readable through the volume's mounted file system
Amazon EBS exposes an attached volume as a block device rather than an object-storage location. To extract files from an existing EBS dataset, make its existing file system available on the attached EC2 instance and have the extraction process read the mounted files. A volume restored from a snapshot can already contain the file system and dataset.
Trap Formatting a restored dataset volume as if it were empty, which overwrites its existing file system and data.
3 questions test this
- An ML engineer creates an Amazon EBS volume from a snapshot that holds 2 TB of labeled sensor files and attaches it to an EC2 instance for a feature extraction job. The team runbook for new volumes sa
- A data science team keeps a 500 GB image dataset on an Amazon EBS volume attached to an EC2 instance. The team wants to catalog and prepare the images with AWS Glue and Amazon S3-based tools. A develo
- An ML engineer restores an Amazon EBS volume from a snapshot that contains a training dataset. The volume was created in us-east-1b, but the processing instance runs in us-east-1a. The attach operatio
- An EFS-to-S3 DataSync transfer can use the managed EFS source without an agent
When an existing Amazon EFS file corpus must be copied to Amazon S3 for preparation, configure an EFS source location and an S3 destination in AWS DataSync. For a transfer within the same AWS account, whether in the same Region or across Regions in the same AWS partition, no DataSync agent is required; DataSync accesses the EFS mount target through VPC network interfaces. Configure the location's subnet, security groups, and file-system access permissions so the source files are readable.
Trap Treating managed EFS as an on-premises NFS source requiring a deployed DataSync agent, which applies the self-managed file-server access path unnecessarily.
3 questions test this
- An Amazon EFS file system with training data restricts access with a file system policy that requires IAM authorization. A DataSync task that copies the data to Amazon S3 in the same account fails wit
- A team must copy 15 TB of training documents from an Amazon EFS file system to an Amazon S3 bucket in the same AWS account and Region. An engineer plans to launch an EC2 instance, deploy a DataSync ag
- An ML engineer creates a DataSync EFS location and an S3 location in the same account and Region and starts a task. The task fails because DataSync cannot connect to the file system's mount target. Th
- Incremental RDS extraction through Glue depends on suitable JDBC bookmark keys
Extract Amazon RDS relational tables through an AWS Glue JDBC connection compatible with the database engine. Use a full table read when all source rows are required; for repeated incremental reads, enable JDBC bookmarks and select keys that satisfy the bookmark ordering requirements. User-defined bookmark keys must each be strictly monotonically increasing or decreasing, because Glue compares their values with saved progress to identify later rows. An update to an old row whose bookmark key remains unchanged is not newly discoverable through that key alone.
Trap Selecting a revision counter reused across different records as a bookmark key, which violates the required monotonic ordering across the dataset.
3 questions test this
- An AWS Glue job reads an orders table from Amazon RDS for MySQL each hour through a JDBC connection with job bookmarks. The developer set the bookmark keys to order_id and revision_no. The order_id co
- An AWS Glue job loads a 2 GB customer table from Amazon RDS for MySQL with JDBC bookmarks on the auto-increment customer_id column. Analysts find that address and status changes to existing customers
- An AWS Glue ETL script reads an Amazon RDS for PostgreSQL table through JDBC with jobBookmarkKeys set to a strictly increasing event_id column. Job bookmarks are enabled in the job properties, but eve
- Glue can extract selected OpenSearch index documents into a preparation job
Use an AWS Glue for Spark OpenSearch Service connection when existing indexed documents must become input to dataset preparation. Select the source index and supply an OpenSearch query with pushdown so the service returns the relevant documents to a DynamicFrame. This native connection supports OpenSearch Service domains, not OpenSearch Serverless, so verify the source deployment type before choosing it.
3 questions test this
- A team keeps product embeddings and descriptions in an Amazon OpenSearch Serverless vector search collection. An ML engineer plans to read the documents into an AWS Glue 4.0 job by creating a Glue Ope
- An insurer stores 80 million claim documents in an Amazon OpenSearch Service domain index. An ML engineer must prepare a training set in an AWS Glue 4.0 job from only the claims with status closed fro
- An ML engineer created an AWS Glue OpenSearch Service connection for a domain, stored the domain credentials in an AWS Secrets Manager secret, and selected that secret in the connection. A Glue 4.0 jo
- AWS Glue executes multi-source joins and unions in its managed Spark environment
AWS Glue Spark jobs run Apache Spark as the processing engine for batch dataset merging, including Join and Union transforms configured in the visual ETL editor. The Join transform takes two input datasets and explicit matching keys; the Union transform requires compatible input schemas and offers ALL or DISTINCT behavior. Select DISTINCT when the merged output must remove duplicate rows, rather than assuming that appending sources automatically deduplicates them.
3 questions test this
- An AWS Glue Studio job unions sales data from two Regions. The Union node shows an error that the input schemas do not match. The EU source has the same columns as the US source plus an extra vat_rate
- An ML engineer merges three monthly customer-event extracts with identical schemas in AWS Glue Studio. Some events appear in more than one extract as exact duplicate rows because the exports overlappe
- An ML engineer is building a visual AWS Glue Studio job that must enrich order rows with attributes from a customers dataset and a products dataset. The engineer connects all three sources to a single
- Parquet and ORC suit repeated analytical reads of selected columns
When feature preparation repeatedly reads a subset of a wide dataset's columns, store the analytical copy in Parquet or ORC. Columnar layout and compression can reduce the data read by compatible query engines. CSV remains useful for simple interchange but does not provide the same column-oriented layout.
Trap Choosing CSV because it is human-readable when the controlling requirement is minimizing repeated wide-table column scans.
3 questions test this
- An ML engineer receives a nightly CSV extract from a partner. The partner's billing system can read only CSV, and the engineer must send back a scored version of the same file every morning. The engin
- A company stores two years of transaction history in Amazon S3 as uncompressed CSV files. The table has 380 columns. An ML engineer runs Amazon Athena feature queries several times each day that read
- A data science team has an Amazon Athena table over 18 months of CSV training data in Amazon S3. Feature engineering queries repeatedly read a small subset of the table's columns. The team wants an an
- JSON represents nested records without flattening them into positional columns
JSON is suitable for semi-structured records that contain named fields, nested objects, or arrays. CSV is a flat row-and-column representation, so nested content requires an agreed serialization or flattening convention. Choose the input format that the consumer actually supports rather than assuming every ML algorithm accepts nested JSON.
Trap Writing nested objects directly into ordinary CSV fields without an encoding convention, which leaves the intended structure ambiguous to the reader.
3 questions test this
- An ML engineer is preparing training data for the Amazon SageMaker AI built-in DeepAR forecasting algorithm. Each of 5,000 product time series has a start timestamp, a variable-length array of daily s
- An ML engineer deployed a model trained with the Amazon SageMaker AI built-in XGBoost algorithm to a real-time endpoint. A client application produces nested JSON documents that contain an account obj
- An ML engineer has nested JSON customer events in Amazon S3 that are cataloged in the AWS Glue Data Catalog. A downstream team loads training data into a relational warehouse that accepts only flat ta
- Firehose format conversion uses JSON input and a Glue schema
Amazon Data Firehose can convert JSON records to Parquet or ORC before delivery to Amazon S3 by using a schema in the AWS Glue Data Catalog. When the incoming records use another format, transform them into compatible JSON before conversion. Catalog fields govern which data can be represented in the converted output.
Trap Enabling Parquet conversion directly on raw CSV records, although the format-conversion stage expects JSON input.
3 questions test this
- An ML engineer is configuring Amazon Data Firehose to convert JSON sensor events to Apache Parquet before delivery to Amazon S3. Each event has a top-level device_id field and a nested reading object
- A company streams point-of-sale records through Amazon Data Firehose to Amazon S3. Each record arrives as one comma-separated line of text. The ML team wants the delivered objects stored as Apache Par
- A company sends JSON events from mobile apps to an Amazon Data Firehose stream that delivers them to Amazon S3. Data scientists run Amazon Athena queries that read a few columns across millions of eve
- S3 archival choices must match the dataset's retrieval requirements
When a dataset must be read immediately, choose a storage class that supports immediate access. S3 Glacier Flexible Retrieval and S3 Glacier Deep Archive require restoration before ordinary access, whereas S3 Glacier Instant Retrieval supports millisecond retrieval. A lower storage charge alone does not make a restore-based archive suitable for an immediately scheduled preprocessing run.
Trap Putting the next training run's only dataset copy in S3 Glacier Deep Archive to minimize storage cost while retaining an immediate-read requirement.
3 questions test this
- An ML engineer runs a quarterly retraining job that reads training data from one Amazon S3 prefix. A lifecycle rule moved the prefix's objects to S3 Glacier Flexible Retrieval 90 days ago. The latest
- A company keeps a 25 TB benchmark image set in S3 Glacier Deep Archive. A new regression-test pipeline will read every image about once a quarter, at unpredictable times, and must read the objects wit
- A company keeps 200 TB of raw images in S3 Glacier Flexible Retrieval. A new project will start training on a 30 TB subset of those images in three days, and nothing needs the data before then. The en
- S3 Intelligent-Tiering fits datasets with changing or unknown access patterns
Use S3 Intelligent-Tiering when access frequency is difficult to predict and automatic movement between access tiers is useful. Its monitoring and automation have their own cost considerations, and optional archive tiers introduce retrieval considerations. A fixed infrequent-access class is a different choice when the access pattern is already known.
Trap Treating S3 Standard-IA as an automatic access-pattern optimizer, although it is a selected storage class rather than an automatic tiering mechanism.
3 questions test this
- A company has 2 PB of existing training data in S3 Standard and adds about 5 TB of new data each week. The company has chosen S3 Intelligent-Tiering because no one can predict which data will be read
- A company stores training datasets in S3 Intelligent-Tiering because their access patterns are unpredictable. An engineer proposes activating the optional Archive Access and Deep Archive Access tiers
- An ML platform team stores thousands of feature snapshots in Amazon S3. Some snapshots are reused heavily for months, while others are never read again, and the team cannot predict which will be reuse
- S3 Object Lock compliance mode prevents early deletion of protected versions
When a dataset version must remain immutable for its retention period even against privileged users, use S3 Object Lock compliance mode. Governance mode permits authorized bypass, so it serves a different control requirement. Object Lock protects object versions rather than preventing the creation of a new version with the same key.
Trap Choosing governance mode for retention that administrators must not bypass, although specially authorized users can bypass governance retention.
3 questions test this
- An ML engineer protects model training snapshots in Amazon S3 with Object Lock governance mode and a 3-year retention period. During an audit, the security team finds that an administrator deleted a l
- A training pipeline writes features.parquet to an Amazon S3 bucket that has Object Lock enabled, and each version receives a 2-year compliance-mode retention period. A bug caused the pipeline to uploa
- A healthcare company stores versioned training datasets in an Amazon S3 bucket that has Object Lock enabled. Regulations require that each dataset version stay unaltered for 6 years after it is writte
- An S3 legal hold remains until an authorized user removes it
Use an S3 Object Lock legal hold when preservation must continue without a predetermined expiration date. A fixed retention period instead protects a version until a specified date. Legal holds and retention periods are independent, so expiration of retention does not remove an active legal hold.
Trap Using only a fixed retention date for an investigation with an unknown end date, which allows the time-based protection to expire.
3 questions test this
- An ML engineer tries to permanently delete an old training data version from an Amazon S3 bucket that has Object Lock enabled. The version's governance-mode retention period expired last month, but a
- A company uses Amazon S3 Object Lock legal holds to preserve training datasets that are under regulatory review. A data scientist who has broad S3 permissions removed a legal hold by mistake and then
- A bank keeps model training data in Amazon S3 under a 7-year compliance-mode retention period. An internal investigation now requires that a subset of those object versions stay protected until the in
- S3 dataset partitions should match the filters used by downstream queries
Partition an S3 analytical dataset by fields commonly used to restrict queries, such as event date or customer identifier. A partition-aware query engine can then prune irrelevant partitions and read only the relevant portion of the dataset. This optimization selects which groups of files to scan, complementing columnar formats that reduce which columns must be read within those files.
3 questions test this
- Ingestion jobs write customer transactions to Amazon S3 under prefixes named after each ingestion job run. Athena feature queries filter by region and by transaction month and rarely filter by anythin
- An ML engineer stores three years of IoT sensor readings in Amazon S3 as Apache Parquet files under one prefix. Daily feature jobs run Amazon Athena queries that filter on the reading date and almost
- An ML engineer partitioned a 3 TB training dataset in Amazon S3 by date, hour, and device ID, which created millions of partitions that hold files of a few kilobytes each. Amazon Athena feature querie
- A reproducible prepared corpus needs a versioned artifact and its source lineage
Version prepared datasets and record the source identities, source versions or extraction points, and transformations that produced each version. Retain the relevant source and output versions under the dataset's retention policy so a particular corpus can be reproduced and audited. Source metadata identifies where data came from, while transformation lineage explains how it became the prepared artifact.
Trap Keeping only the preparation code while overwriting the input and output datasets, which preserves transformation logic but loses the specific data used by an earlier run.
- Kinesis Data Streams supports replay within the retained stream history
When independent applications must consume and replay the same incoming records, use Amazon Kinesis Data Streams and keep the required history within its retention window. Each consumer maintains its own progress through the stream. Amazon Data Firehose focuses on managed delivery to destinations rather than exposing an equivalent general-purpose replay log.
Trap Choosing a Firehose delivery stream as the independent replay log, although its delivery interface is not the Kinesis Data Streams consumer model.
3 questions test this
- A Kinesis data stream with a 7-day retention period feeds three consumer applications. A bug in the feature-engineering consumer corrupted features for records written since yesterday at 14:00 UTC. Th
- A team uses a Kinesis data stream with the default retention period to feed a model-training data pipeline. Twice this quarter, consumer bugs were found on Monday morning, and the team had to reproces
- A company ingests card transactions in real time. A fraud-feature application and an archival application must both read every transaction within seconds through their own stream consumers. After a bu
- Firehose buffering affects when records reach their destination
Amazon Data Firehose buffers incoming records before delivery according to the destination and configured buffering settings. Select settings that fit the required freshness rather than equating ingestion acceptance with destination availability. Larger delivery batches can improve write efficiency but can delay visibility of low-volume data.
Trap Increasing Firehose buffer intervals to solve a low-volume delivery-freshness problem, which extends the period before a buffer is delivered.
3 questions test this
- A retailer's Amazon Data Firehose stream calls a Lambda function that masks card numbers in point-of-sale events before delivery to Amazon S3. Traffic is about 1 KB per second. The Lambda processing b
- An IoT application sends about 20 KB of sensor readings per minute to an Amazon Data Firehose stream that delivers to Amazon S3 with the default buffering hints. An anomaly model reads the S3 objects
- A clickstream Firehose stream receives 40 MB per second and delivers to Amazon S3 with a 1 MB buffering size and a 10-second interval. Downstream AWS Glue training-data jobs are slow because the bucke
- A hot Kinesis partition key can bottleneck one shard
With partition-key-based record distribution, Kinesis Data Streams maps partition keys to shards, so a heavily reused key can concentrate writes on one shard. When throttling is concentrated rather than evenly distributed, review the key distribution as well as total capacity. In this mode, adding shards does not split a single partition key's records across multiple shards.
Trap Adding aggregate shard capacity while keeping all high-volume events under one partition key in a stream using partition-key-based record distribution, which leaves that key concentrated on one shard.
3 questions test this
- A video analytics gateway sends frame metadata to a Kinesis data stream using its gateway ID as the partition key. The single gateway produces about 3 MB per second, while all other keys are small. Th
- Shard-level CloudWatch metrics for a 12-shard Kinesis data stream show that one shard receives 3 times the writes of the others and throttles at peak. Logs of the MD5 hash keys show that about 300 dif
- Producers write order events from 400 stores to a Kinesis data stream with 8 provisioned shards, using the constant partition key "orders". The producers receive ProvisionedThroughputExceededException
- Enhanced fan-out gives registered consumers dedicated shard read throughput
When multiple Kinesis consumers contend for shared read throughput, use enhanced fan-out for consumers that need dedicated delivery capacity. Shared-throughput consumers compete within the shard's shared read allowance. Enhanced fan-out addresses consumer contention, not a producer-side hot-key write bottleneck. Shards belong to the stream, not to producers (a Kinesis data stream is a set of shards[1]): adding shards still leaves shared-throughput consumers splitting each shard's read throughput[2].
Trap Adding shards solely to isolate competing readers without considering enhanced fan-out's per-consumer read capacity.
3 questions test this
- Five consumer applications read the same Kinesis data stream with GetRecords. A real-time fraud scoring consumer now sees average delays near 1 second and ReadProvisionedThroughputExceeded errors, alt
- Producers writing to a Kinesis data stream receive WriteProvisionedThroughputExceeded errors on one shard, because a few high-volume partition keys hash to that shard. Two consumers read the stream wi
- A Lambda function scores card transactions from a Kinesis data stream through an event source mapping that uses a standard iterator. Three other applications poll the same stream with GetRecords. At p
- Kinesis ordering is scoped to shards rather than the whole stream
Kinesis Data Streams assigns sequence numbers to records within a shard. Use partitioning that keeps related events together when their relative order matters, and account for producer sequencing and retries. A multi-shard stream does not provide a single total order across unrelated partition keys.
Trap Sorting all stream records by sequence number as though sequence numbers form a globally ordered stream-wide counter.
3 questions test this
- A custom consumer builds per-device features from a Kinesis data stream and needs each device's records in sequence-number order. The stream uses the device ID as the partition key. After the team spl
- A nightly job reads a day of records from all 24 shards of a Kinesis data stream and sorts them by sequence number to rebuild a global timeline of user events for training. Analysts find that events f
- A producer sends sensor readings for each machine to a Kinesis data stream with the machine ID as the partition key. It sends records in parallel threads and retries failed calls. The consumer sometim
- Event-time processing groups stream records by when the events occurred
Use event time in Amazon Managed Service for Apache Flink when features such as windowed transaction counts must reflect source-event timestamps despite delivery delays. Processing time instead follows the clock of the machine executing the operation, and ingestion time follows entry into the service. Select the time basis that matches the feature's business meaning.
Trap Using processing-time windows for event-occurrence statistics when network delays can move records into later processing windows.
3 questions test this
- A Managed Service for Apache Flink application computes clicks-per-session features from a mobile app's clickstream. A session ends after 30 minutes with no clicks. Phones queue clicks while offline a
- A Managed Service for Apache Flink application reads purchase events from a Kinesis data stream and computes hourly per-user features with event-time windows and a watermark strategy. Each event carri
- An operations team wants a Managed Service for Apache Flink metric that shows how many records the application processes each minute, so that it can alert quickly when throughput drops. The source eve
- Kafka topics organize streams into partition-level ordered logs
Apache Kafka organizes records into named topics, with each topic divided into partitions that act as ordered logs. Producers append records to a partition and consumers read from positions within that log. Use partition-aware ingestion when related records need ordered processing; parallel partitions do not form one globally ordered topic log.
3 questions test this
- A company replicates an Amazon MSK topic named orders to a cluster in a secondary Region by using MSK Replicator with prefixed topic names. During a service event in the primary Region, the team fails
- A consumer reads an Amazon MSK topic with 12 partitions that are keyed by account ID. To go faster, the consumer collects each poll's records from all partitions and sends them to a pool of 32 worker
- An ML team builds each training dataset by reading an Amazon MSK topic that has 12 partitions and a 90-day retention period. Auditors require that, within the retention period, any dataset version can
Use the same Apache Kafka consumer group for workers that should share one ingestion workload. Within a group, a partition is assigned to only one consumer at a time, so partition count bounds useful consumer parallelism. Use separate consumer groups when independent applications each need to consume the stream for their own purpose.
Trap Increasing topic replication to give more workers partition assignments, which adds redundant record copies rather than additional partitions for the group to share.
3 questions test this
- An ingestion job reads an Amazon MSK topic with 12 partitions. To scale out, a developer started 4 worker processes, but each worker generates a random consumer group ID at startup. The downstream fea
- A feature pipeline and a data-lake archiver both consume the same Amazon MSK topic, and each must process every record. Both applications were configured with the same consumer group ID, and each now
- An Amazon MSK topic has 6 partitions. To process a growing ingestion backlog, an ML engineer scales the consumer group from 6 to 12 workers. Throughput does not change, and monitoring shows that 6 wor
- Kafka committed offsets record where a consumer group should resume
Apache Kafka offsets identify positions within topic partitions, and committed consumer-group offsets preserve consumption progress for resumption. Keep the intended group identity and its saved offsets when restarting an ingestion consumer. Replay also requires the source records to remain within the topic's retained history; saving a position does not retain the underlying records indefinitely.
Trap Relying on topic replication alone to resume a restarted consumer: replication adds copies of each partition for durability, while a consumer that rejoins its group resumes from the consumer group's committed offset.
3 questions test this
- An ML engineer runs a weekly consumer group on Amazon MSK that copies a clickstream topic into a training data lake every Sunday. The topic keeps records for 4 days. The group's committed offsets are
- A company uses MSK Replicator with consumer group offset syncing to copy feature topics from a primary Amazon MSK cluster to a standby cluster. The replicator's consumer group filter excludes groups w
- A batch feature job consumes an Amazon MSK topic once a month with a fixed consumer group ID. Between runs, the group has no active consumers. Although topic retention is 60 days, each run starts from
- Firehose dynamic partitioning can route records by their content and event date
When S3 delivery must group records by customer or the date the source event occurred, use Amazon Data Firehose dynamic partitioning with keys extracted from each record. Firehose evaluates the configured S3 prefix expression and groups records with the same result for delivery. Deriving date components from the record's event timestamp also places delayed events with their event-date data rather than merely with records that arrived together.
2 questions test this
- A team is creating a new Amazon Data Firehose stream that delivers JSON purchase events to Amazon S3. Analysts train per-customer models and query Amazon Athena by customer_id and by event date, and e
- An existing Amazon Data Firehose stream without dynamic partitioning uses the prefix dt=!{timestamp:yyyy-MM-dd}/ for mobile app events. Phones that were offline upload events up to 2 days late, and th
- Firehose dynamic partition cardinality can exhaust capacity despite modest total traffic
Amazon Data Firehose creates a separate buffer for every active dynamically evaluated S3 prefix, and each buffer is delivered independently when its size or time condition is met. Many low-volume prefixes can therefore produce small objects and a high active-partition count even when aggregate ingestion throughput is modest. Check partition cardinality and stalled deliveries when diagnosing active-partition errors: a partition remains active until its buffered data is delivered, and exceeding the active-partition quota routes excess records to the S3 error prefix.
Trap Increasing the buffering interval to address small files when active-partition capacity is already exhausted, which can keep more partition buffers active for longer.
2 questions test this
- A Firehose stream partitions clickstream data by session_id, which creates about 3 new partitions per second. The buffering interval was raised from 60 to 900 seconds to make objects larger, and recor
- A Firehose stream with dynamic partitioning uses the prefix device_id=!{partitionKeyFromQuery:device_id}/ for 50,000 IoT devices that each send a few records per hour. Total traffic is only 2 MB per s
- Firehose can insert newline separators between records delivered to S3
Enable Firehose's new line delimiter option when downstream readers need newline-separated records within delivered S3 objects. This setting adds separators between output records, whereas multi-record deaggregation splits logical events bundled inside an input record. Choose the setting for the boundary that needs to change: output record separation or input event separation.
Trap Using Firehose's JSON-to-Parquet conversion to meet a newline-delimited text requirement, which produces a columnar format instead of the expected text records.
- Firehose partition-key failures can be diagnosed from the S3 error prefix
A missing or differently named field can prevent Firehose from extracting the configured dynamic partition key and evaluating the destination prefix. Firehose delivers records that fail parsing, key extraction, or prefix evaluation to the required S3 error prefix, organized by error type and accompanied by error details. Inspect those details and compare the failed record's field names and structure with the extraction expression before correcting the producer or routing configuration.
Trap Requesting a higher active-partition quota for missing-key errors, which changes partition capacity rather than repairing the record fields used for routing.
2 questions test this
- A Firehose stream with dynamic partitioning uses inline jq parsing to extract region and event date. A legacy producer that was added last week sends CSV lines instead of JSON, and all of its records
- After a producer release, most records from a Firehose stream with dynamic partitioning land in the S3 error prefix instead of the customer prefixes. The inline parsing key uses the jq expression .cus
- Firehose loads Redshift through S3 staging and a COPY command
For an Amazon Redshift destination, Amazon Data Firehose first delivers streaming records to an S3 bucket and then issues a Redshift COPY command to load them into the cluster. Include that staging bucket in the delivery configuration and distinguish successful S3 delivery from completion of the Redshift load. If source-record backup is also enabled for transformed data, that optional backup serves a separate purpose from the S3 staging step.
2 questions test this
- A team is configuring an Amazon Data Firehose stream that loads clickstream records into an Amazon Redshift provisioned cluster for feature engineering. To reduce cost, the team wants to remove the Am
- An Amazon Data Firehose stream loads clickstream records into an Amazon Redshift table for feature engineering. The team's only CloudWatch alarm watches DeliveryToS3.Success, and it stayed green last
- RDS for PostgreSQL with pgvector adds vector retrieval to relational data
When an existing PostgreSQL application must combine SQL data with embedding similarity search, use the pgvector extension on a supported Amazon RDS for PostgreSQL version. It supplies vector storage and similarity operations within the database. Keep this choice distinct from moving the dataset into a separate search service when the stated requirement is to retain relational integration.
Trap Moving relational records into an OpenSearch index solely to obtain vectors when the requirement specifically calls for SQL integration inside the existing database.
2 questions test this
- An ML engineer must add embedding similarity search to an Amazon RDS for PostgreSQL DB instance that has run the same older engine version for several years. Similarity ranking must run inside the SQL
- An ecommerce company runs its product catalog on Amazon RDS for PostgreSQL. A new feature must return products that are semantically similar to a shopper's query, filtered by price, stock level, and r
- OpenSearch Service supports text search alongside vector similarity
Use Amazon OpenSearch Service when an existing retrieval workload needs both full-text search and vector similarity. Store embeddings in a vector field and retain searchable text or structured fields for the other query requirements. Embedding generation remains a separate preparation step unless an explicitly configured model integration performs it.
Trap Selecting a vector-only similarity operation as a replacement for exact keyword matching when both retrieval behaviors are required.
2 questions test this
- An ML engineer creates an Amazon OpenSearch Service index with index.knn enabled and a knn_vector field of dimension 1,024, then loads 2 million product documents that contain only text fields. The se
- A support portal stores troubleshooting articles in an Amazon OpenSearch Service domain. Each document holds a knn_vector field with an embedding of the article, but the article text was not indexed.
- S3 Vectors uses vector buckets and indexes rather than ordinary object listings
Amazon S3 Vectors stores embeddings in vector indexes within vector buckets and exposes similarity-query operations. Use these resources when the specified workload needs S3-native vector storage and retrieval. Uploading arrays into ordinary S3 objects preserves the bytes but does not itself create a similarity-search index.
Trap Storing embeddings as JSON objects in a general-purpose S3 bucket and expecting object-list operations to perform nearest-neighbor search.
2 questions test this
- A team stores 3 million document embeddings as JSON files in a general-purpose Amazon S3 bucket. To find similar documents, a Lambda function lists the objects, downloads them, and compares vectors in
- A legal research company must store 500 million document embeddings for a retrieval application that is queried a few times an hour by internal analysts. Sub-second latency for these occasional querie
- Every vector in an S3 vector index must match its configured dimension
Configure an S3 vector index with the embedding model's selected output dimension. Every inserted vector must have exactly that number of values. Changing to a different output dimension requires a new index because the dimension of an existing index cannot be updated.
Trap Padding a newly generated shorter embedding with arbitrary values to reuse an incompatible index, which changes the intended vector representation.
2 questions test this
- An S3 vector index was created with a dimension of 1,024 for an embedding model's default output. To cut storage, the team will embed all documents and all queries with the same model's 512-dimension
- An S3 vector index with a dimension of 256 holds 9 million document embeddings from Amazon Titan Text Embeddings V2, and the query service embeds questions with the same 256 setting. A code refactor r
- The vector distance metric should follow the embedding model's recommendation
Choose the index distance metric that the embedding model recommends. In S3 Vectors, cosine distance emphasizes vector direction, while Euclidean distance incorporates straight-line separation and therefore magnitude. Changing the metric of an existing S3 vector index requires a new index rather than an in-place setting change.
Trap Choosing cosine distance for a representation whose required similarity depends on vector magnitude as well as direction, although cosine comparison discards that magnitude distinction.
2 questions test this
- An ML engineer is creating an S3 vector index for embeddings from a custom recommendation model. The model's documentation recommends Euclidean distance because its vectors are not normalized and vect
- An S3 vector index that holds 40 million vectors was created with the Euclidean distance metric. A review finds that the embedding model's documentation recommends cosine distance, and a new internal
- Only filterable vector metadata can restrict S3 similarity queries
Keep attributes such as document category filterable when retrieval must restrict results by those attributes. S3 Vectors metadata is filterable unless configured as non-filterable; non-filterable fields can accompany returned vectors but cannot be used as query filters. Long source text that is returned for context is a suitable candidate for non-filterable metadata.
Trap Marking a required category-filter field as non-filterable to save filterable metadata space, which removes that field from filtering operations.
2 questions test this
- An ML engineer created an S3 vector index and listed category as a non-filterable metadata key to save filterable space. The RAG application must now get the 10 most similar legal chunks from one Quer
- A RAG application uses an S3 vector index. Each result must show the retrieved chunk's text, which is up to 6 KB, and its source URL, and every query filters on product_line. The index allows 2 KB of
- Approximate nearest-neighbor search trades exactness for retrieval efficiency
When an OpenSearch vector workload needs scalable similarity retrieval, an approximate nearest-neighbor index can avoid exhaustively comparing every stored vector. Approximation can miss neighbors that exact search would return, so evaluate recall as well as query latency. Use exact search when the required result guarantees and dataset size justify exhaustive comparison.
Trap Treating approximate nearest-neighbor results as guaranteed identical to exhaustive search merely because both return a requested number of neighbors.
2 questions test this
- A team moved product search to an Amazon OpenSearch Service index that uses HNSW approximate k-NN. Query latency dropped from seconds to milliseconds, and the team reported that results are identical
- A compliance tool stores 20,000 policy embeddings in Amazon OpenSearch Service. For audit reasons, every query must return exactly the same nearest neighbors that a full comparison against all stored
- Knowledge-base synchronization incrementally processes source changes
After adding, modifying, or removing documents in a connected knowledge-base source, synchronize the source so the indexed content reflects those changes. Synchronization processes documents changed since the preceding sync rather than requiring every unchanged document to be processed again. Updating the source files alone does not complete the indexing step.
Trap Recreating the entire knowledge base after every document edit to refresh retrieval, although incremental synchronization processes the source changes.
2 questions test this
- An HR team publishes revised policies to the Amazon S3 data source of an Amazon Bedrock knowledge base as new objects, such as leave-policy-v2.pdf, and leaves the earlier files in the bucket. After ea
- A company uses an Amazon Bedrock knowledge base with an Amazon S3 data source of 40,000 policy documents. About 30 documents are edited each week. To refresh answers, an engineer deletes and recreates
- Scanned documents need OCR before ordinary text preprocessing
When source PDFs contain page images rather than an extractable text layer, use OCR such as Amazon Textract to obtain text. Ordinary PDF text extraction is appropriate for digitally authored documents with embedded text. Inspect the extracted output because document layout can affect reading order and field interpretation.
Trap Using a text-only PDF parser on scanned page images, which have no embedded text for that parser to extract.
2 questions test this
- An ML engineer builds a fine-tuning corpus from 8,000 scanned equipment manuals that are stored in Amazon S3. Each page is an image with two text columns. The current job runs Amazon Textract text det
- An ML engineer is building a fine-tuning corpus from 80,000 PDF files in Amazon S3. Some PDFs were exported from word processors, and others are scans of paper contracts. A text-extraction library tha
- HTML ingestion should separate page content from navigation boilerplate
When preparing web pages as a text corpus, extract the passages that bear on each page's subject rather than keeping a raw HTML dump, so less of the model's input goes to boilerplate and navigation, and keep the headings, which help RAG models understand document structure. When menus repeat across pages, a dump of every visible string can overrepresent those menus rather than each page's subject.
Trap Using a dump of every visible string as clean article content, which includes repeated navigation and unrelated page elements.
2 questions test this
- A company crawled 2 million pages from its documentation website to pretrain a domain language model. An engineer saved the full visible text of each page. Analysis shows that menu labels, cookie bann
- An ML engineer extracts the main content from internal web pages for a retrieval corpus. The pages contain parameter tables, numbered procedures, and code samples. After all HTML tags are stripped, ta
- Transcribe batch and streaming transcription have different input requirements
Use Amazon Transcribe batch transcription for media files in Amazon S3 and streaming transcription for live media streams. Supported audio formats differ between these modes, so a format accepted by a batch job is not automatically a valid streaming encoding. Validate the actual encoding before choosing the ingestion mode.
Trap Sending a WAV file unchanged as streaming PCM because batch transcription accepts WAV, although a WAV container is not raw PCM stream encoding.
2 questions test this
- A media company has 50,000 recorded podcast episodes as MP3 and M4A files in Amazon S3. It wants transcripts as training data for a topic classifier. A developer proposes opening a streaming transcrip
- A contact center wants live captions for agents by streaming call audio to Amazon Transcribe. To test, a developer recorded calls as WAV files, which batch transcription jobs accepted, and then sent t
- Speaker partitioning and channel identification solve different audio layouts
Use Transcribe speaker partitioning when multiple speakers share one audio channel and their speech must be distinguished. Use channel identification when speakers are already separated into different audio channels. Both can produce a single transcript file, so the number of output files is not the selection criterion.
Trap Selecting channel identification to separate speakers mixed into one channel, which provides no separate channels for that feature to identify.
2 questions test this
- A bank records support calls as stereo files with the agent on the left channel and the customer on the right channel. For a sentiment model, every utterance in the transcript must be tagged with the
- A research team records panel discussions with four speakers using one microphone, which produces mono audio files in Amazon S3. The team needs transcripts in which each utterance is attributed to a d
- A declared audio sample rate must match the actual recording
Amazon Transcribe streaming requests require the audio sample rate, while batch requests can omit it. When supplied, the rate must describe the actual audio; changing the declared number does not resample the recording. A mismatch can make a transcription request fail.
Trap Declaring a higher sample rate to improve low-fidelity audio, which changes request metadata rather than the samples themselves.
2 questions test this
- An application streams telephone audio recorded at 8,000 Hz to Amazon Transcribe. To improve accuracy, a developer set MediaSampleRateHertz to 16,000 in every streaming request. Since the change, some
- An ML engineer is transcribing 200,000 archived recordings from Amazon S3 with batch jobs. The archive mixes 8,000 Hz phone calls, 16,000 Hz meeting recordings, and 44,100 Hz studio audio, and the fil
- Long-lived transcription datasets should be saved to controlled storage
For batch transcripts that must remain available as training data, specify an Amazon S3 output bucket you control and grant Transcribe permission to write there. Service-managed output provides temporary download access and is removed when the transcription job expires. A temporary download link is not a durable dataset location.
Trap Saving only the service-managed transcript download URL as the permanent dataset reference, although that URL expires.
2 questions test this
- A team created 20,000 Amazon Transcribe batch jobs over the last 60 days without specifying an output bucket. The pipeline now writes new transcripts to a company-owned S3 bucket, but the earlier tran
- A data pipeline starts Amazon Transcribe batch jobs without an output bucket and stores each job's TranscriptFileUri in a dataset catalog as the permanent location of the training transcript. Weeks la
- Image ingestion must validate usable image assets rather than just file locations
An image corpus needs decodable files in formats and dimensions supported by the consuming workflow. During ingestion, identify corrupted images and create resized working copies where required, while retaining the original assets and a source reference linking each prepared image to its origin. Data Wrangler supports image import, corrupted-image removal, and resizing; a Ground Truth input manifest's
source-refentries can preserve the association between an S3 image location and its dataset record.Trap Replacing the image corpus with OCR text, which preserves extracted characters but not the visual assets required by an image workflow.
2 questions test this
- A retailer has 500,000 product photos in Amazon S3 for an image classification model. Some files are corrupted and crash the training job, and image sizes vary widely. A teammate proposes running OCR
- An ML engineer prepared resized copies of 200,000 medical images with Data Wrangler and wrote them to a new S3 prefix. Auditors require that every prepared image can be traced to its original file, an
- Feature Store online and offline stores serve different access patterns
Use the Feature Store online store for low-latency access to current feature values and the offline store for historical training datasets and batch analysis. A feature group can use either store or both. The offline store preserves history in Amazon S3 rather than acting as the low-latency current-value lookup.
Trap Querying the offline store for every latency-sensitive inference request because it contains the complete history, which substitutes analytical access for the online lookup path.
3 questions test this
- An ML engineer must train a churn model on how each customer's features changed over the last 18 months. The features are ingested into a feature group with an online store and an offline store. A tea
- A retail analytics team computes demand features for 30,000 products each week. The features are used only by a weekly SageMaker AI training job and a weekly batch transform job that reads features in
- A payments company scores card transactions with a SageMaker AI endpoint during authorization, which must finish in under 50 ms. The features for each card are already ingested into a feature group th
- Feature group ingestion requires a defined record schema and event time
Before ingesting features, define the feature names and types, the record identifier, and the event-time feature. The record identifier identifies the entity, while event time identifies when the feature record applies. Validate incoming values against this contract rather than treating a feature group as an arbitrary schemaless document collection.
Trap Using the ingestion job's run identifier as every entity's record identifier, which collapses unrelated entities under the same lookup key.
3 questions test this
- An ML engineer loads a CSV file of loan features into a pandas DataFrame and calls load_feature_definitions to create a feature group. Several numeric columns were read with the object dtype because s
- An ML engineer builds a nightly job that ingests features for 2 million customers into a feature group. To finish quickly, a developer set the record identifier to the job's run_id column. After the f
- A data engineer prepares a pandas DataFrame of supplier risk features with a supplier_id column and eight numeric feature columns. The source extract contains no timestamp column. The engineer tries t
- Feature Store uses event time to distinguish current values from history
When an ingested record has a later event time than the existing record for that entity, it can replace the current online value. Older historical records are written to the configured offline history instead of replacing newer online state. This allows historical backfills without making current features stale.
Trap Assuming the last-arriving historical record becomes the online value solely because it was ingested last, which ignores event-time ordering.
3 questions test this
- A streaming consumer writes features to a feature group and sets each record's event time to the time the consumer processes it. After a bug fix, the team replays 30 days of events from Amazon Kinesis
- A feature group with online and offline stores serves a live churn model. An ML engineer must load a billing system file that holds 3 years of customer history. For about 2% of customers, the file als
- A feature group with an online store and an offline store holds a customer_tier feature. A streaming job writes a record for customer 42 with an event time of 10:00 UTC and a tier of gold. Minutes lat
- Feature Store can target offline ingestion without changing online features
When a historical dataset should populate only the offline store, explicitly target that store during ingestion. Otherwise, Feature Store targets the stores configured for the feature group, subject to event-time rules. Store targeting controls where records are ingested; it does not create a store that was never configured.
3 questions test this
- A feature group with online and offline stores serves a production endpoint. An ML engineer must load 3 years of historical features with the Feature Store Spark connector on Amazon EMR. The backfill
- A new feature group with both stores was created for a model. An ML engineer already loaded 5 years of history into its offline store by offline-only direct ingestion. The online store is empty, and t
- An ML engineer created a feature group with only an online store for a real-time model. A new requirement asks the team to keep 12 months of feature history for retraining. The engineer adds TargetSto
- A Feature Store PutRecord write replaces a record rather than patching one field
Feature Store PutRecord performs a full-record overwrite, so provide the feature values that the resulting record must contain. Use UpdateRecord with the Standard_V2 online store tier when the requirement is to change individual feature values without replacing the rest. Selecting the write semantics prevents an ingestion update from unintentionally dropping unrelated values.
Trap Sending only one changed feature in a full-record replacement and expecting omitted features to be merged automatically.
3 questions test this
- A feature group with a Standard_V2 online store holds 40 features for each customer. A nightly job recalculates only credit_tier and sends PutRecord calls that contain the customer ID, the event time,
- A feature group with only an offline store holds supplier features for batch training. One feature, lead_time_days, was ingested with wrong values for 5,000 suppliers. An ML engineer must write correc
- A feature group with the Standard online store holds 120 million records. A new fraud-scoring service must change one or two features per record many times each hour without rewriting full records. Th
- Feature Store accepts both incremental updates and batch feature loads
Use streaming record writes when updated features must become available as individual source updates arrive. Use a batch processing workflow, such as a Data Wrangler export executed as a SageMaker AI Processing job, for scheduled bulk feature preparation and ingestion. Both approaches populate feature groups rather than requiring separate feature definitions for each arrival mode.
Trap Building a separate feature repository solely because source updates arrive in batches, although Feature Store supports batch ingestion.
3 questions test this
- Data scientists engineered 60 features in an Amazon SageMaker Data Wrangler flow that reads a daily file from Amazon S3. The prepared features must be loaded into an existing feature group every night
- A bank receives the same customer income features in two ways: nightly batch files from a partner and a new event stream from its own systems. An architect proposes a separate Amazon S3 feature reposi
- A media company streams click events into Amazon Kinesis Data Streams. Session features in a feature group must reflect each click within a few seconds for a real-time recommendation endpoint. Today a
- Offline feature history needs explicit snapshot selection for training
Feature Store's offline store is append-only historical storage in Parquet, so a raw query can return several versions of the same entity. Select the required time horizon and handle deleted or duplicate records when constructing a training dataset. The dataset-building helpers can perform this filtering; a raw table scan does not inherently represent one current row per entity.
Trap Treating every offline history row as an independent current entity, which mixes multiple feature versions into the training population.
3 questions test this
- A streaming service calls DeleteRecord when a customer closes an account. An ML engineer builds training data with an Athena query that keeps each customer's newest row from the offline store table. C
- An auditor asks an ML engineer to rebuild the exact feature table that trained a credit model on June 30, 2025. Since then, the feature group has received millions of newer records, and some customers
- A feature group has received daily updates for 400,000 subscribers for two years. A data scientist builds a churn training set with SELECT * against the offline store table in Amazon Athena and gets 2
Transform data and engineer features
Read full chapterUnlock with Premium — includes all practice exams and the complete study guide.
Validate data quality and manage bias
Read full chapterUnlock with Premium — includes all practice exams and the complete study guide.
ML Model and Foundation Model (FM) Development
Choose ML and AI modeling approaches
Read full chapterCheat sheet
Sharp facts the exam loves — scan these before test day.
- A foundation model must support both the required input and output modalities
Choose a foundation model by checking input and output modalities separately. A model that understands images and produces text can describe an image but is not thereby an image generator. For image creation, select a model explicitly supporting image output, such as Stability AI Stable Image Ultra in Amazon Bedrock.
Trap Choosing a multimodal understanding model for image generation because image input support is mistaken for image output support.
3 questions test this
- A company is reviewing four proposed Amazon Bedrock model assignments before development starts. Each assignment must be confirmed against both the input and the output modalities listed on the chosen
- An interior design app lets customers upload a photo of a room and then shows a newly generated image of the redesigned room. The ML engineer plans a two-step flow on Amazon Bedrock: one model describ
- A software company's support assistant uses Amazon Nova Micro through the Amazon Bedrock Converse API. Customers can now attach screenshots of error dialogs, and every request that includes a screensh
- Context window and maximum output tokens are separate model constraints
A foundation model's context window and maximum output tokens constrain different parts of a request. When processing long documents, compare the model card's context window and maximum output tokens with the required input context and response length; a large context window does not imply equally long generated responses. Choose a model that satisfies both constraints.
Trap Selecting solely by context-window size when the required response exceeds the model's separate output limit.
3 questions test this
- A software company wants one Amazon Bedrock request to turn a 20,000-token codebase summary into a detailed migration plan of about 45,000 tokens. A developer proposes the model with the largest conte
- A law firm needs an Amazon Bedrock model that reads contracts of up to 250,000 tokens in one request and writes a detailed review of up to 40,000 tokens. The ML engineer compares the published model c
- A legal team uses Amazon Nova Pro in Amazon Bedrock to write detailed minutes from hearing transcripts of about 150,000 tokens. The Nova Pro model card lists a 300K token context window and 10K max ou
- Task-specific evaluation distinguishes foundation models better than model card capability labels alone
When several Amazon Bedrock models support the task, evaluate their responses on prompts representative of that task. Use the relevant quality metrics and compare results before selecting a model. Supporting text generation establishes compatibility, not that a model meets a particular domain's accuracy or response-quality requirement.
Trap Selecting from the model card's modality support alone, which establishes supported inputs and outputs rather than measured task quality.
3 questions test this
- A company must decide whether to keep its fine-tuned model hosted on a SageMaker AI endpoint or move to Amazon Nova Pro in Amazon Bedrock. Both models must be compared on the same 400 prompts taken fr
- A property management company must choose between two Amazon Bedrock text models to summarize its lease agreements. Both model cards list text input and text output, and both models fit the budget. Mo
- A company's assistant uses an Amazon Bedrock knowledge base and must choose between Amazon Nova Pro and Anthropic Claude Haiku 4.5 as the response generator. Retrieval quality is already acceptable. T
- A lower-cost model is appropriate when it meets the measured quality and latency requirements
Choose among foundation models using task quality, latency, and cost together. Amazon Bedrock offers model variants with different capability and price-performance profiles, so a simpler text task can be served by a faster, lower-cost option if it passes the required evaluation. More capable models remain appropriate when the task requires the additional capability.
Trap Choosing the most capable model for every request without checking whether the additional capability is needed within the latency and cost budgets.
3 questions test this
- A retailer classifies short customer emails into eight routing categories by using a model in Amazon Bedrock. An evaluation on 2,000 labeled emails shows Amazon Nova Micro and Amazon Nova Pro both exc
- A financial analytics team evaluated Amazon Nova Lite and Amazon Nova Pro on 300 representative multi-step reasoning prompts about quarterly filings. Nova Lite missed the accuracy target by a wide mar
- A company runs two Amazon Bedrock features: extracting fields from short shipping notices, and multi-step reasoning over carrier contracts. An evaluation on representative prompts shows that Amazon No
- An embedding model produces vectors for retrieval rather than conversational answers
When the application needs semantic representations for a vector index, use an embedding model such as Amazon Titan Text Embeddings. It returns numeric vectors; the vector database performs similarity search. A separate generative model can use the retrieved text to compose an answer.
Trap Using a text-generation response as the vector-index value, because generated prose is not the embedding representation the index searches.
3 questions test this
- A company wants to group 50,000 customer complaints by meaning so that analysts can find recurring issues. Analysts must be able to compute a numeric similarity between any two complaints and adjust t
- A developer built a retrieval prototype by asking an Amazon Bedrock text model to write a one-line description for each document chunk, storing those descriptions in the index, and matching user queri
- A company is building semantic search over 200,000 support articles. Each article chunk must be stored in an Amazon OpenSearch Serverless vector index, and user queries must be compared against the ch
- Foundation model features must be checked for the exact model and version
Amazon Bedrock model capabilities are not uniform across a family or across versions. Check the chosen model's support for required features such as streaming, fine-tuning, and the intended API before committing to it. A model can support inference while lacking a customization feature available on another member of its family.
Trap Choosing a model by family name and inheriting another family member's fine-tuning support, which is specified per model.
3 questions test this
- A company in us-east-1 calls Amazon Nova Pro for text and Stability AI Stable Image Ultra 1.0 for images. Peak traffic exceeds in-Region capacity, so the platform team plans to move every model to a U
- A company wants an Amazon Bedrock intelligent prompt router in us-east-1 that sends simple requests to a cheaper Amazon Nova model and complex requests to a more capable one. A developer proposes Amaz
- A bank must fine-tune a small text model in Amazon Bedrock on labeled examples, and its data residency policy requires the fine-tuning job to run in us-east-1. The team shortlisted Meta Llama 3.1 8B I
- Supervised fine-tuning learns a task's desired behavior from labeled examples
When prompting is insufficient for a well-defined output style, format, or task behavior, consider supervised fine-tuning with representative input-output pairs. Training adjusts model parameters toward the demonstrated responses. The technique is a behavior-customization choice rather than the default mechanism for supplying continually changing reference information.
Trap Choosing retrieval alone to teach a persistent output style, because retrieved reference passages supply context rather than parameter updates from demonstrations.
3 questions test this
- A claims company uses an Amazon Bedrock foundation model to turn adjuster notes into a fixed JSON summary with company-specific field names and phrasing. Detailed prompt instructions and examples stil
- An ML engineer is choosing a customization method in Amazon Bedrock for a ticket-triage model. The engineer has 8,000 historical support tickets, and each ticket is paired with the human-written triag
- A retailer's assistant answers product questions by using Amazon Bedrock Knowledge Bases over its catalog. Answers are factually correct, but they ignore the brand's required tone, sentence length, an
- LoRA fine-tuning updates adapters instead of all model parameters
When a supported customization workflow must adapt a model on a compute budget that covers only adapter training, consider LoRA, a parameter-efficient fine-tuning method. It trains small adapter matrices while the base model weights stay frozen, which SageMaker AI documents as lower cost, faster training, and smaller artifacts. Full fine-tuning updates all model weights and is a different resource commitment.
Trap Choosing full fine-tuning for an adapter-only resource budget, because it updates all model weights.
3 questions test this
- A software company needs separately customized versions of one foundation model for 30 enterprise customers, each trained on that customer's examples. Hosting 30 full copies of the model is too expens
- A startup wants to customize an open-weight foundation model with SageMaker AI model customization for a support-ticket summarization task. The team has a modest GPU budget, a few thousand labeled exa
- A pharmaceutical company plans a large domain shift for a foundation model by using a very large, high-quality proprietary dataset. Maximum customization depth is required, and the team does not want
- Reinforcement fine-tuning uses scored feedback when a single target response is unsuitable
When response quality can be scored but there is no single desired answer for each input, consider supported reinforcement fine-tuning in Amazon Bedrock. Reward functions evaluate generated responses and supply feedback for iterative learning. Supervised fine-tuning instead learns from labeled input-output demonstrations.
Trap Choosing supervised fine-tuning with only unlabeled prompts and no target responses, which omits the demonstrations that supervised training needs.
3 questions test this
- A logistics company uses Amazon Nova 2 Lite in Amazon Bedrock to draft delivery-route plans. Many different plans can be acceptable for one request, and an existing validator program scores any plan f
- An ML engineer plans reinforcement fine-tuning in Amazon Bedrock for a model that must produce structured incident reports. A baseline evaluation with the planned reward function shows rewards that ar
- A developer-tools company wants a foundation model to write SQL queries that pass the company's automated test suites. For many prompts, several different queries are equally valid, so no single corre
- Distillation transfers task behavior through teacher-generated training responses
When a capable teacher model meets quality requirements but is too expensive or slow for the target workload, evaluate Amazon Bedrock Model Distillation with a supported student. Bedrock generates teacher responses for use-case prompts and fine-tunes the student on those responses. Evaluate the resulting student's task quality rather than assuming it inherits all of the teacher's capabilities.
Trap Using a prompt router when a separately trained student is required, because routing selects among existing models without transferring teacher behavior.
3 questions test this
- An insurer has called a large teacher model through the Amazon Bedrock Converse API for months, and CloudWatch Logs invocation logging stored the prompts and responses in Amazon S3. The insurer wants
- A media company uses Amazon Nova Premier for a headline-writing task and is satisfied with its quality. To cut cost, an architect proposes an intelligent prompt router that sends easier requests to No
- An insurer used Amazon Bedrock invocation logging for six months while serving claims questions with Amazon Nova Pro, so the logs hold prompts and Nova Pro responses. Nova Pro missed the quality targe
- Additional fine-tuning epochs increase the volume of training tokens processed
Amazon Bedrock customization training charges depend on the tokens processed during training, including repeated passes through the training corpus. Increasing the epoch count therefore increases training work even when the dataset is unchanged. Choose training duration from validation results and the budget rather than treating additional epochs as free quality improvement.
Trap Budgeting training from the corpus size alone, which ignores repeated token processing across epochs.
3 questions test this
- An ML engineer runs a monthly supervised fine-tuning job for an Amazon Nova Lite model in Amazon Bedrock on a 25-million-token dataset with 2 epochs. Finance will approve only a change that leaves the
- A team runs supervised fine-tuning of an Amazon Nova Lite model in Amazon Bedrock on a 30-million-token dataset for 2 epochs, and the budget covers exactly that volume of processed training tokens. Th
- An ML engineer runs a monthly supervised fine-tuning job for an Amazon Nova Micro model in Amazon Bedrock with 3 epochs. An audit finds that 12 million of the dataset's 40 million training tokens are
- Continued pre-training adapts an existing foundation model using unlabeled domain text
When an existing foundation model needs deeper familiarity with domain terminology and writing patterns and a substantial unlabeled corpus is available, consider supported continued pre-training. It continues training the existing model on raw domain documents rather than requiring input-output demonstrations, and you can then fine-tune the adapted model for downstream tasks with significantly fewer labeled records. Supervised fine-tuning instead teaches demonstrated task responses, while RAG supplies current reference material at inference time without retraining the model whenever that material changes.
Trap Using model distillation to introduce a new domain corpus, although distillation transfers a teacher's task behavior through generated responses rather than learning directly from unlabeled documents.
3 questions test this
- An ML team completed continued pre-training of an Amazon Nova model on a large corpus of unlabeled maintenance manuals. The model now uses equipment terminology fluently, but when technicians ask it q
- A utility company has about 3 billion tokens of unlabeled maintenance logs and engineering manuals. It wants an Amazon Nova model to use its equipment terminology and writing patterns fluently. The do
- An energy regulator wants an assistant that writes in its specialized technical language and also answers from policy bulletins that change every month. It has a large archive of unlabeled technical r
- The prediction target determines whether a supervised task is classification or regression
For labeled tabular data, choose classification when the required output is a discrete category and regression when it is a continuous value. Amazon SageMaker AI algorithms such as Linear Learner and XGBoost support these problem families. Configure the learning objective for the target rather than inferring it from whether the input columns are numeric.
Trap Choosing regression for numeric class codes, because a numeric encoding does not turn categorical outcomes into continuous targets.
3 questions test this
- An ML engineer is configuring the Amazon SageMaker AI Linear Learner algorithm to predict whether a subscriber will cancel within 30 days. The label column contains 0 for stays and 1 for cancels. A te
- An insurer trains models on labeled claims data in Amazon SageMaker AI. One model must estimate each claim's payout in dollars and cents. A second model must assign each claim to one of four handling
- A telecom company has a labeled tabular dataset of past customers. The target column records which of five service plans each customer chose, stored as the integer codes 1 through 5 because the source
- K-means discovers groups when category labels are not supplied
When the task is to group customers by similar measured behavior without predefined segment labels, consider the Amazon SageMaker AI K-Means algorithm. Clustering discovers groupings from feature similarity. Supervised classification is appropriate when labeled examples define the categories to predict.
Trap Choosing a supervised classifier for an unlabeled segmentation dataset, which supplies no target categories for supervised training.
3 questions test this
- A media company wants viewer segments for content planning. A data scientist proposes training an XGBoost multiclass classifier on viewing-history features to produce segments. The company has never d
- A retail bank wants to group its credit card customers by similar spending behavior, such as monthly spend, merchant mix, and transaction frequency. No segment labels exist, and the marketing team wan
- A logistics company trained an Amazon SageMaker AI K-means model on unlabeled shipment features to find shipment groups. A manager expects the model to return named categories such as Express or Bulk
- Random Cut Forest identifies unusual observations without requiring anomaly labels
For an unlabeled dataset where the objective is to flag observations that differ from normal patterns, consider Amazon SageMaker AI Random Cut Forest. It is an unsupervised anomaly-detection algorithm. Its anomaly scores identify unusual observations for investigation rather than directly establishing a business label such as confirmed fraud.
Trap Treating an anomaly score as a confirmed fraud classification, which substitutes unusualness for a labeled business outcome.
4 questions test this
- A manufacturer streams readings from 30 sensors on each production line. There are no labels marking failures, but engineers want the system to flag readings that diverge from normal patterns so that
- An insurer trained Amazon SageMaker AI Random Cut Forest on two years of auto claims. None of the claims in the training data was ever labeled as fraud or legitimate. The claims director now proposes
- A utility collects hourly electricity load for 400 related substations and has two years of history with no labels of any kind. Operators need two outputs. They need an alert for any hour whose load b
- A manufacturer scores unlabeled vibration readings with an Amazon SageMaker AI Random Cut Forest model. Engineers must decide which readings to send to technicians for inspection, and no labeled failu
- DeepAR matches forecasting tasks that predict future time-series values
When the required prediction is future behavior from historical time-series observations, consider Amazon SageMaker AI DeepAR. Forecasting differs from assigning a category to the current record. Select and evaluate the forecasting approach against the future values the application must predict.
Trap Choosing K-Means to produce future numeric forecasts, because clustering groups observations rather than predicting a future sequence.
3 questions test this
- A hospital supply team must forecast daily usage of 600 related consumables for the next 21 days. Purchasing sets safety stock from the 90th percentile of expected usage, so it needs a range of likely
- A grocery chain has three years of daily sales history for 2,000 related products across its stores. It needs to predict each product's daily sales for the next 28 days to plan replenishment. The ML e
- A utility collects hourly electricity load for 400 related substations and has two years of history with no labels of any kind. Operators need two outputs. They need an alert for any hour whose load b
- Topic modeling discovers document themes rather than predicting predefined labels
When a document corpus has no topic labels and the requirement is to discover themes, use an unsupervised topic model such as LDA or Neural Topic Model. Use supervised text classification when the required categories are already defined and labeled examples are available. The distinction is whether topics are discovered or supplied as targets.
Trap Choosing an unsupervised topic model for exact business-category prediction, because discovered topics need not correspond to the required labels.
3 questions test this
- An insurer ran Amazon SageMaker AI LDA with 8 topics on claim notes, expecting each topic to match one of its 8 official claim types. Reviewers found that topics mix several claim types and that one c
- A software company has 1.5 million unlabeled support tickets. Product managers want to learn which recurring themes appear across the tickets; no category list exists yet, and nobody knows in advance
- A news publisher must tag each new article with one of 14 editorial sections that the newsroom has already defined. It has 200,000 past articles that editors tagged with these sections. An analyst pro
- Object detection returns locations that image classification does not provide
When an application must locate multiple objects within an image, choose object detection rather than image-level classification. Supported Amazon SageMaker AI object-detection models return bounding boxes and labels. Image classification is appropriate when a label for the image as a whole satisfies the task.
Trap Choosing image classification for a bounding-box requirement, because image-level labels do not locate individual objects.
3 questions test this
- A parking operator wants to process camera images of its lots and return the location of every car in each image so that it can count cars and identify occupied bays. Each image can contain dozens of
- An electronics manufacturer is preparing training data for an Amazon SageMaker AI Object Detection model that must find and locate solder defects on circuit board images. A contractor proposes labelin
- A shipping company runs an Amazon SageMaker AI Image Classification model that labels each conveyor photo as containing or not containing a damaged package. A robotic arm must now pick out every damag
- Semantic segmentation is appropriate when every image pixel needs a category
For a computer-vision task requiring pixel-level category assignments, select semantic segmentation. Amazon SageMaker AI provides a built-in semantic-segmentation algorithm for this fine-grained output. Bounding-box detection is sufficient when approximate object locations, rather than pixel boundaries, meet the requirement.
Trap Choosing object-detection boxes for a pixel-mask requirement, because a rectangle does not classify each enclosed pixel.
3 questions test this
- A warehouse wants to count pallets in overhead camera images and know roughly where each pallet sits so that forklifts can be dispatched. Exact pallet outlines are not needed. An ML engineer proposes
- A medical imaging startup needs a model that marks the exact boundary of a tumor in each MRI slice by assigning every pixel to tumor or healthy tissue. Clinicians will measure tumor area from the resu
- A flood-response agency analyzes aerial images to estimate how many square meters of farmland are underwater. The current Object Detection model draws boxes around flooded areas, but irregular flood s
- BlazingText supports efficient supervised text classification
When labeled documents must be assigned to predefined categories, Amazon SageMaker AI BlazingText provides an optimized text-classification implementation. It also offers Word2vec functionality, but that mode produces word representations rather than category predictions. Choose the mode that matches the required output.
Trap Selecting BlazingText's Word2vec mode for direct document-category predictions, because word embeddings are representations rather than classification outputs.
3 questions test this
- An ML engineer trained Amazon SageMaker AI BlazingText on 2 million product reviews, each labeled with one of 15 defect categories, to tag new reviews automatically. The training file uses the __label
- A legal-tech company wants word embeddings that capture semantic relationships in its legal vocabulary. It plans to use the embeddings as input features for several downstream models built later by ot
- A publisher has 400,000 articles, each labeled with one or more of 30 predefined subject tags. A new tagging service must suggest the three most likely tags for each new article, with a probability fo
- Sequence-to-sequence models fit supervised transformations between token sequences
When paired examples map an input sequence to an output sequence, consider a sequence-to-sequence approach. Amazon SageMaker AI's built-in algorithm supports tasks such as translation and summarization. This differs from text classification, which selects a category instead of generating a new sequence.
Trap Using a text classifier for translation, because its category output cannot express an arbitrary translated sentence.
3 questions test this
- A utility company has 250,000 pairs of technician shorthand notes and the full standardized sentences that office staff later wrote from them. It wants a model that converts each new shorthand note in
- A medical device maker has a parallel corpus of 400,000 English sentences from its manuals paired with approved German translations. A developer proposes training a text classifier in which each Germa
- A research institute has 90,000 long technical reports, each paired with an abstract written by its authors. It wants a model that reads a new report and produces a new abstract in the same style. An
- Explanation requirements can justify choosing an inherently interpretable model
When a requirement calls for directly understandable decision logic, choose an inherently interpretable candidate, such as a simple linear model or small decision tree, if it meets the required predictive performance. Its weights or decision rules expose how inputs determine predictions, which can justify accepting lower accuracy than a more complex candidate. Post-hoc feature attribution explains aspects of an already trained model's behavior; it does not make that model's internal decision logic inherently simple.
3 questions test this
- An insurer's pricing committee requires that underwriting decisions follow rules the committee can read and audit directly. The data science team wants to deploy a deep neural network and attach Amazo
- A regional lender must give regulators a model whose decision logic loan officers can read and explain directly. On the validation set, a linear model with a small set of features reaches 0.84 AUC, wh
- A payments company's chargeback-risk model must reach a precision of at least 0.75. On validation data, the best logistic regression and shallow decision tree candidates reach 0.61 precision, while an
- A built-in algorithm avoids implementing the training algorithm yourself
When an Amazon SageMaker AI built-in algorithm fits the data and prediction task, supply data, hyperparameters, and compute configuration to run training. The algorithm implementation is already provided. This reduces development effort compared with writing an equivalent training implementation in a framework script.
Trap Reimplementing an available built-in algorithm in a framework script when the sole requirement is equivalent training with minimal custom code.
3 questions test this
- A data science team trains a demand-forecasting model and must optimize a custom asymmetric loss function that penalizes under-forecasting more than over-forecasting. The team also needs a third-party
- A company trained a linear regression model on premises with an open-source library and recorded the hyperparameter values that worked best. It now wants to retrain the model on much larger data in Sa
- A retail company wants to predict whether each loyalty member will churn next quarter by using a labeled tabular dataset in Amazon S3. Gradient-boosted trees are already known to work well for this pr
- SageMaker JumpStart provides reusable pretrained models and solution templates
When a supported pretrained model or solution template already fits the application task, use Amazon SageMaker JumpStart as a starting point. It offers reusable options for tasks such as text analysis and computer vision. This avoids implementing and training a comparable model from scratch while preserving the need to evaluate it on the intended workload.
Trap Starting a new model-training implementation for a task already satisfied by a suitable pretrained model, which adds development and training work.
3 questions test this
- An ML engineer selected a pretrained question answering model in SageMaker JumpStart for an internal help desk. The model card shows strong results on public benchmarks. Leadership asks for evidence t
- A startup needs an image classification model for a mobile app that sorts photos into common categories such as food, pets, and landscapes. A suitable pretrained open-source model already performs thi
- A platform team deploys ML models only through an automated CI/CD pipeline that runs Python code; engineers do not use Amazon SageMaker Studio. The team wants to start a new text summarization service
- Amazon Bedrock provides managed foundation model access without operating model hosts
When the existing application needs supported foundation models through a managed service, choose Amazon Bedrock rather than building model-serving infrastructure. Bedrock exposes foundation-model capabilities through APIs and supplies associated customization and evaluation features. Amazon SageMaker AI remains appropriate when the workflow requires greater control over custom model development and training.
Trap Building a custom model-serving stack for a supported Bedrock model when the requirement is managed API access with minimal hosting operations.
3 questions test this
- A product team is prototyping a summarization feature and wants to compare foundation models from several providers before committing to one. After launch, the team expects to switch to newer models a
- A company is adding a feature that drafts replies to customer emails by using a foundation model. The required model is available in Amazon Bedrock. The company's two-person engineering team cannot ma
- An internal tool uses a foundation model to classify a few hundred support tickets per day, with long idle periods overnight and on weekends. The model is available in Amazon Bedrock. Finance wants to
- A task-specific AWS AI API can remove the need to train a general model
When a business task matches a pretrained AWS AI capability, use the task-specific service if it meets the required quality and customization needs. Services such as Amazon Textract and Amazon Comprehend expose document-analysis functions directly. A custom training workflow earns its additional effort when the managed capability does not satisfy the task.
Trap Training a custom model solely to reproduce an adequate pretrained API, which adds model-development work without satisfying an additional requirement.
3 questions test this
- A bank must remove customer names, credit card numbers, and postal addresses from English chat transcripts before analysts can read them. The bank has no annotated transcripts and no ML staff, and it
- An accounting firm wants to extract printed and handwritten text and table data from scanned client tax forms. A proposal suggests training a custom object detection and character recognition model in
- A global retailer receives about 50,000 customer emails each day in more than 30 languages. Each email must be routed to the support queue for its language within seconds of arrival. The company has n
- Built-in algorithm scaling support must be checked before selecting training resources
Amazon SageMaker AI built-in algorithms do not all support the same CPU, GPU, or multi-instance training configurations. Select resources supported by the chosen algorithm rather than assuming every managed algorithm distributes automatically. For example, the built-in sequence-to-sequence algorithm supports GPU training on a single machine, including supported multi-GPU instances.
Trap Adding multiple training instances to an algorithm documented for single-machine training, because managed execution does not override algorithm support.
3 questions test this
- A company must retrain a tabular binary classification model every night on 2 TB of data, and the job must finish within a short window by distributing training across several instances. The team is c
- An ML engineer trains a translation model with the SageMaker AI built-in Sequence-to-Sequence algorithm on a single GPU instance, and each run takes too long. A teammate proposes increasing the traini
- A team trains the SageMaker AI built-in Semantic Segmentation algorithm on aerial images. Training on the current GPU instance is slower than the project schedule allows. The team lead suggests either
- SageMaker Autopilot automates model development rather than only running a chosen algorithm
When a supported prediction task needs automated model development with minimal manual experimentation, use Amazon SageMaker Autopilot. Its AutoML workflow performs data analysis and preprocessing, explores algorithms, searches hyperparameters, trains candidates, and ranks them using validation performance. Manually selecting a built-in algorithm is appropriate when the algorithm is already chosen, while a custom training script provides control over training logic that the automated workflow does not supply.
Trap Using automatic model tuning alone as a replacement for an AutoML workflow, although tuning optimizes the supplied training configuration rather than supplying the whole preprocessing and candidate-development process.
3 questions test this
- A utility wants daily demand forecasts for 3,000 substations from two years of history stored as CSV files in Amazon S3. The team has not chosen a forecasting algorithm and wants SageMaker AI to explo
- A lender has a 60 MB tabular dataset in Amazon S3 for a loan-default classifier and has not chosen an algorithm. The team wants SageMaker AI to train several model types, such as LightGBM, CatBoost, a
- A lender must build a credit-default classifier from tabular data but has not chosen an algorithm. Compliance reviewers require a report of each feature's importance for the selected model. They also
- SageMaker Canvas supports custom predictive modeling through a no-code interface
When users need to build, evaluate, and use a custom predictive model without writing code, choose Amazon SageMaker Canvas for a supported prediction task. Its interface lets users import their data, build a model trained on that data, evaluate its performance, and generate predictions. Supported custom-model tasks include regression, classification, and time series forecasting, so the selection depends on both the required prediction type and the need for a no-code workflow.
Trap Using Canvas Ready-to-use models for a requirement to train a custom predictor on the user's data, because those models provide pretrained AI capabilities rather than that custom training workflow.
- RAG supplies private or changing knowledge at inference time
When answers need current private reference information, use RAG to add relevant source material to the prompt. The model can use this context without being retrained whenever the information changes. Fine-tuning is better suited to changing learned task behavior than to maintaining a frequently updated reference corpus.
Trap Repeatedly fine-tuning solely to refresh a changing reference catalog, which turns content updates into training jobs.
3 questions test this
- A company's Amazon Bedrock assistant answers employee questions about internal benefits rules that the HR team updates in Amazon S3 every week. A manager proposes fine-tuning the model after each upda
- A media monitoring company wants an Amazon Bedrock assistant that answers analysts' questions from about 4 billion tokens of private news summaries stored in Amazon S3. Hundreds of summaries are added
- A hospital network wants an assistant that answers staff questions from internal clinical procedures. The procedures are private, were never part of any model's training data, and are revised every fe
- Bedrock Knowledge Bases manages semantic retrieval over documents in Amazon S3
For an existing document repository in Amazon S3, Amazon Bedrock Knowledge Bases can manage ingestion, chunking, embedding, and retrieval for a RAG application. It maintains the relationship between indexed chunks and their sources. This supplies a managed retrieval layer rather than requiring a custom document-to-vector pipeline.
Trap Using Amazon Textract as the semantic-search index, because document extraction does not provide the vector-retrieval layer.
3 questions test this
- An engineering firm stores 80,000 design specifications as PDF and Word files in Amazon S3 and wants semantic retrieval for a RAG assistant on Amazon Bedrock. The firm has no staff to choose, provisio
- An engineering company has thousands of scanned maintenance manuals in Amazon S3. An architect proposes running Amazon Textract on every manual and using the stored Textract JSON output as the search
- A consulting firm stores 60,000 reports as PDF and Word files in an Amazon S3 bucket. It wants a RAG application on Amazon Bedrock that finds relevant passages for user questions. The team has no time
- Retrieve separates source retrieval from answer generation
When an application needs retrieved passages for its own downstream generation logic, use the Retrieve operation of Amazon Bedrock Knowledge Bases. RetrieveAndGenerate combines retrieval with model invocation and returns a generated answer with source citations. Choose according to whether the application or the managed operation should compose the answer.
Trap Calling RetrieveAndGenerate for a retrieval-only component, which adds answer generation that the application intends to control separately.
3 questions test this
- An insurance company's claims application already has its own prompt templates, its own model invocation, and output validation logic. It needs only the most relevant passages from an Amazon Bedrock k
- A small HR team wants an internal Q&A tool over its Amazon Bedrock knowledge base. It has no prompt templates or generation code of its own and wants one managed API call that returns a natural-langua
- A bank runs a RAG assistant over an Amazon Bedrock knowledge base of product policies. Compliance permits only the bank's own fine-tuned model, hosted on a SageMaker AI endpoint, to generate answer te
- A structured knowledge base can query existing tables without first embedding every row
When the reference data already resides in a supported structured store, Amazon Bedrock Knowledge Bases can translate natural-language questions into suitable queries and retrieve the results. GenerateQuery provides query conversion separately when the application needs that control. This pattern uses the existing schema rather than requiring an unstructured-document vector workflow.
Trap Exporting every table row to text solely to enable retrieval, despite a supported structured-store connection that can query the data directly.
2 questions test this
- A retailer keeps several years of sales data as Parquet tables in Amazon S3, cataloged in the default AWS Glue Data Catalog. Managers want Amazon Bedrock Knowledge Bases to answer natural-language que
- A retail company keeps sales, inventory, and store data in Amazon Redshift tables with a well-defined schema. Managers want to ask natural-language questions such as total sales by region last quarter
- GraphRAG retrieves related context when answers depend on connections across documents
When a RAG workload needs facts connected through multiple document relationships, consider Amazon Bedrock Knowledge Bases GraphRAG with Amazon Neptune Analytics. It expands initial vector-search results by traversing related graph nodes or chunks. This is useful when independently similar passages omit relationships needed for a complete answer.
2 questions test this
- A manufacturer's Amazon Bedrock knowledge base uses vector-only retrieval over documents in Amazon S3: product manuals, part catalogs, supplier contracts, and quality incident reports. The ML engineer
- A pharmaceutical company's RAG assistant must answer questions that link trial reports, supplier records, and recall notices stored as documents in Amazon S3. A vector-only knowledge base returned ind
- Textract document analysis preserves form and table structure
When a document workflow needs form fields or table cells rather than just recognized text, choose Amazon Textract document analysis. Its form and table capabilities extract structured relationships from the document. Text detection (
DetectDocumentText) is sufficient when words and lines alone satisfy the requirement.Trap Choosing text detection (
DetectDocumentText) for structured form extraction, because recognized words alone do not supply form and table relationships.3 questions test this
- An insurance company receives scanned claim forms as single-page PNG images in Amazon S3. Each form contains labeled fields such as policy number, claimant name, and incident date, plus several checkb
- A hotel chain scans single-page guest surveys. Each survey contains a grid in which every row is a service topic and every column is a rating, and guests tick one checkbox per row. An ML engineer must
- A logistics company digitizes its own customs declaration forms, which arrive as single-page scans in Amazon S3. Each form has labeled fields and a goods table, and the layout is unique to the company
- Textract asynchronous operations support multipage document processing
When a workflow must process multipage documents, choose an appropriate asynchronous Amazon Textract operation. Synchronous processing is suited to supported single-page documents when immediate response latency matters. Select the processing mode from document structure and response timing together.
Trap Selecting synchronous document processing for a multipage input, which exceeds the documented single-page scope of that mode.
3 questions test this
- A company stores signed supplier contracts in Amazon S3 as PDF files of 20 to 60 pages. An ML engineer must extract the key-value pairs and tables from every page of each contract. The extraction runs
- A mortgage company receives loan packages as single PDF files of 80 to 150 pages. Each package mixes pay stubs, bank statements, tax forms, and identity documents in no fixed order. An ML engineer mus
- A research archive holds scanned historical newspapers as multipage TIFF files in Amazon S3. The archive needs only the lines and words on each page, with their positions, to build a keyword index. Th
- Textract expense analysis targets invoices and receipts
When the application needs invoice or receipt information, use Amazon Textract AnalyzeExpense rather than assembling equivalent extraction from text detection. The specialized analysis is designed for these document types. Generic document analysis remains suitable for other forms and tables.
Trap Using only text detection and custom parsing for standard expense extraction, which discards the purpose-built invoice and receipt capability.
3 questions test this
- A retailer processes scanned receipts from small vendors. Many receipts show the vendor name only inside a logo at the top of the page, with no printed vendor label beside it. The current pipeline use
- An accounts-payable workflow receives two kinds of single-page documents in Amazon S3: supplier invoices and the company's own vendor-onboarding forms. For invoices, it needs the vendor, invoice numbe
- A company's expense app receives receipt photos from thousands of different merchants. An ML engineer must extract the vendor name, transaction date, tax, and total from every receipt into fixed datab
- Textract Queries extracts requested information from documents
When a document workflow needs specific information expressed as questions, use the Queries feature in Amazon Textract document analysis. It targets the requested information rather than requiring the application to inspect every extracted word. Custom Queries can adapt this pretrained capability to a particular document use case.
3 questions test this
- A healthcare provider scans single-page referral forms. The intake system needs the full medication table from each form. It also needs two specific values that appear in free text: the referring phys
- A clinic digitizes vaccination record cards, each scanned as a single-page image. A reporting job needs one value from each card: the date on which the second dose was administered. The value sits in
- An insurer receives 12-page policy documents as PDF files from many carriers. A claims system needs only three values from each document: the policy number, the insured's name, and the coverage end da
- Rekognition Custom Labels recognizes business-specific visual categories
When generic image labels do not cover proprietary products or logos, use Amazon Rekognition Custom Labels with examples of the required categories. It supports custom visual classifiers without requiring a from-scratch vision implementation. General label detection is appropriate when the pretrained categories already meet the requirement.
Trap Relying on generic label detection to distinguish proprietary product categories that its pretrained label set does not define.
3 questions test this
- A manufacturer uses an Amazon Rekognition Custom Labels model to inspect circuit-board photos. The model was trained with image-level labels and reports only whether a board contains a defective compo
- A food processor wants to grade photos of apples on a conveyor as ripe, unripe, or rotten. Amazon Rekognition label detection recognizes apples but does not report their quality grade. The company has
- A beverage company wants to audit store-shelf photos to count how often each of its 40 proprietary bottle designs appears. Amazon Rekognition DetectLabels returns generic labels such as Bottle and Bev
- Rekognition content moderation identifies unsafe visual content with confidence scores
For image or video moderation, use Amazon Rekognition content-moderation capabilities. They return unsafe-content categories and confidence information that an application can apply to its review policy. This is different from ordinary object labeling or detecting sentiment in text.
3 questions test this
- A social media startup must screen user-uploaded profile photos for explicit or violent content before the photos are published. The trust-and-safety team wants to block photos above a confidence leve
- An online marketplace calls Amazon Rekognition DetectModerationLabels on listing photos. Photos with very high confidence for an unsafe label are removed automatically. The policy team wants photos wh
- A company that sells medical training content runs Amazon Rekognition DetectModerationLabels on its course images. Anatomy illustrations are often flagged as unsafe, and some company-specific prohibit
- Targeted sentiment distinguishes opinions about different entities in the same document
When a review praises one product but criticizes another, use Amazon Comprehend targeted sentiment to associate sentiment with individual entities. Document-level sentiment summarizes the overall text and can obscure these differences. Choose the scope of sentiment analysis to match the business question.
Trap Using a single document sentiment label for entity-specific feedback, which collapses different opinions into an overall result.
3 questions test this
- A hotel booking app lets guests type a short English review after checkout. Before the guest leaves the page, the app must show which mentioned items, such as the room, the pool, or the staff, were de
- An electronics retailer collects English product reviews in which customers often praise one product and criticize another in the same review. The product team must report, for each product mentioned,
- A streaming service asks viewers to leave a short English comment after each episode. A churn model needs exactly one overall sentiment value for each comment, stored in a single column with a confide
- Custom classification and custom entity recognition produce different outputs
Use Amazon Comprehend custom classification to assign documents to your own categories. Use custom entity recognition to locate domain-specific terms and noun phrases within text. A document's category and the entities mentioned inside it are separate outputs, so select the custom model type accordingly.
Trap Choosing a document classifier to locate occurrences of domain-specific entities, because category assignment does not extract entity spans.
3 questions test this
- An aircraft maintenance company stores free-text English maintenance logs. Engineers need every internal part number and fault code mentioned in each log extracted with its position in the text so tha
- A retailer wants to find mentions of its own product codes in plain-text customer chat transcripts. It has a list of about 3,000 valid product codes and many unannotated transcripts, but no documents
- A software company receives thousands of English support emails each day. Each email must be routed to one of 12 support queues that the company has defined, such as billing, licensing, and installati
- Comprehend offers real-time analysis and asynchronous processing for different workload sizes
For small interactive document-analysis workloads, use Amazon Comprehend real-time operations where supported. For large document sets, use asynchronous analysis jobs. The processing choice should reflect the required response timing and workload rather than forcing a large corpus through an interactive workflow.
Trap Submitting an asynchronous corpus-analysis job for an immediate per-request response, because completion occurs through the job workflow.
3 questions test this
- An insurance company trained an Amazon Comprehend custom classifier that assigns English claim letters to the company's own 15 claim categories. Every Sunday, about 50,000 new letters are written as t
- A customer-support chat application must show agents the sentiment of each incoming English message while the conversation is in progress. Messages arrive one at a time, and the sentiment must appear
- A bank trained an Amazon Comprehend custom classifier that assigns incoming English complaint messages to the bank's own complaint categories. A new web form must show the predicted category to the cu
- Transcribe streaming handles live audio while batch transcription handles stored recordings
When an application needs text from live audio, use Amazon Transcribe streaming for a supported language and Region. For recordings already stored in Amazon S3, use batch transcription. Both convert speech to text, but their input delivery and response timing fit different workloads.
Trap Choosing batch transcription of S3 recordings for a live transcription requirement, because the workflow expects stored media rather than the ongoing stream.
3 questions test this
- A training company runs live English webinars and must display captions to attendees while the presenter is speaking. The audio is captured from the presenter's microphone as PCM audio. Captions that
- A contact center wants supervisors to be alerted while a call is still in progress whenever a customer says a phrase such as 'cancel my account'. The center also wants sentiment for each speech segmen
- A financial firm must transcribe 3 years of archived English advisory calls for a compliance review. The recordings are WAV files already stored in Amazon S3. There are more files than the account can
Train and customize ML and AI models
Read full chapterUnlock with Premium — includes all practice exams and the complete study guide.
Evaluate ML and AI system performance
Read full chapterUnlock with Premium — includes all practice exams and the complete study guide.
Deployment and Orchestration of ML and AI Workflows
Manage deployment infrastructure for ML and AI models
Read full chapterCheat sheet
Sharp facts the exam loves — scan these before test day.
- Real-time inference fits interactive requests that require immediate predictions
When an application needs synchronous predictions with low latency and sustained throughput, use Amazon SageMaker AI real-time inference. Keep sufficient serving capacity available for the response-time requirement; Asynchronous Inference is appropriate when the caller can collect its result later.
Trap Using batch transform for an interactive transaction, which returns results through an offline job rather than the transaction's synchronous response.
3 questions test this
- A payments company scores every card authorization with an XGBoost fraud model before the checkout API responds to the merchant. Traffic is steady at about 900 requests per second throughout the day,
- A logistics company serves a route-delay model from a SageMaker AI real-time endpoint that runs on two instances with no scaling policy. Delivery tablets wait for each prediction before they show the
- An insurance company's claims portal sends a 6 MB scanned form to a document classification model and must show the predicted claim category on the same page before the user continues. Inference takes
- Batch transform scores stored datasets without a persistent endpoint
When predictions are needed for a stored dataset rather than individual online requests, use Amazon SageMaker AI batch transform. The job provisions compute for the workload and writes results to Amazon S3, avoiding the need to maintain a continuously running inference endpoint.
Trap Keeping a real-time endpoint running between scheduled scoring jobs, which reserves serving infrastructure even when the offline workload has no requests.
3 questions test this
- A retailer stores the full customer table of 40 million rows in Amazon S3. Each night, an ML engineer must generate a propensity score for every row and write the scores back to Amazon S3 for the mark
- An insurer must score a five-year archive of 30 million claims with a trained SageMaker AI fraud model as a one-time backfill. The full archive is already stored in Amazon S3, and results must be writ
- A bank serves live loan decisions from a SageMaker AI real-time endpoint. Each month, the risk team also needs predictions for the full 40-million-row customer table exported to Amazon S3. The bulk sc
- Asynchronous inference queues large or long-running inference requests
When an application can wait for a result and submits large or long-running requests, use Amazon SageMaker AI Asynchronous Inference. Requests identify input in Amazon S3, and outputs are written to S3 rather than returned as synchronous predictions. Optional Amazon SNS notifications tell the application when processing succeeds or fails.
Trap Using Serverless Inference merely because traffic is intermittent, which does not supply the asynchronous S3 request-and-result workflow.
3 questions test this
- An ML engineer has deployed a video-analysis model to a SageMaker AI asynchronous endpoint. A web application must submit each uploaded video for analysis without holding an HTTP connection open while
- A developer integrated an application with a SageMaker AI asynchronous endpoint that analyzes long audio recordings. The InvokeEndpointAsync call returns quickly, but its response does not contain the
- A medical imaging company runs a segmentation model on 3D scans. Each scan is about 600 MB, and inference takes 15 to 25 minutes. Radiology systems upload scans throughout the day and can wait for res
- On-demand Serverless Inference trades cold starts for lower idle cost
When inference traffic is intermittent and the application tolerates cold starts, use on-demand Amazon SageMaker AI Serverless Inference. SageMaker AI launches and scales compute with traffic and scales it to zero when idle, without requiring instance selection or instance-scaling policies.
Trap Choosing a continuously provisioned real-time endpoint for an idle-cost requirement despite accepting cold starts, which retains provisioned capacity between traffic bursts.
3 questions test this
- An ML engineer reviews four CPU-based models that each run on a dedicated real-time endpoint with one instance. The company wants to move models to on-demand Serverless Inference only where idle-time
- A payroll company hosts a small CPU-based intent classifier for its employee help chatbot. Traffic is heavy for 3 days at month end and sporadic for the rest of the month, with idle periods of many ho
- A data science team keeps a model on a SageMaker AI real-time endpoint for an internal labeling tool. The tool is used a few times each day, with idle hours in between, and users accept a few seconds
- Serverless Inference is unsuitable when required hosting features are excluded
Amazon SageMaker AI Serverless Inference does not support, among other features, GPUs, VPC configuration, Model Monitor, data capture, multiple production variants, or inference pipelines. When any of these is a deployment requirement, choose a compatible hosting mode such as real-time inference rather than treating all endpoint modes as interchangeable.
Trap Adding provisioned concurrency to a serverless endpoint to obtain GPU support, which warms serverless capacity without changing the endpoint's feature support.
3 questions test this
- A lender already uses SageMaker Model Monitor, and its compliance policy requires every production credit model to log its request and response payloads to Amazon S3 and to run scheduled SageMaker Mod
- A hospital's security team requires that its patient-triage model run with a VPC configuration in private subnets and with network isolation so that the container has no internet access. The model is
- An ML engineer must deploy a computer vision model whose inference code requires a GPU to meet its latency target. The application calls the model a few hundred times a day at unpredictable times and
When many models use the same ML framework and have compatible serving requirements, a SageMaker AI multi-model endpoint can host them in a shared serving container and instance fleet. Sharing raises utilization compared with a separate endpoint for every model. The application must tolerate loading delays for infrequently used models.
Trap Using an inference pipeline to host independent tenant models, which chains processing stages rather than selecting one model for each tenant request.
4 questions test this
- A media company runs 150 PyTorch image-tagging models, and each model is deployed to its own SageMaker AI endpoint on an ml.g5.xlarge instance. Each model is invoked a few times per minute, so GPU uti
- A software company trains a separate XGBoost churn model for each of its 3,000 tenants, and each model has its own SageMaker AI real-time endpoint. Most tenants send only a few requests each day. The
- A retailer has 900 demand-forecasting models that were trained with LightGBM, a framework that has no prebuilt SageMaker AI container with multi-model support. Each model runs on its own endpoint on C
- An insurance company plans to consolidate 400 regional pricing models that use the same TensorFlow serving container onto one SageMaker AI multi-model endpoint. During design review, an architect asks
- Multi-model endpoint latency depends on whether the requested model is already loaded
A SageMaker AI multi-model endpoint loads models on demand and caches them in memory. Under memory pressure it unloads unused models, which can remain on the instance's storage volume for faster reloading. A model with strict latency requirements or disproportionately high traffic is a better candidate for dedicated hosting than for competing with infrequent models in this cache.
Trap Increasing the total number of model files in S3 to warm the endpoint, which does not load those models into serving memory.
5 questions test this
- An ML engineer investigates latency on a SageMaker AI multi-model endpoint. The first request ever made to a newly uploaded model takes several seconds. A model that was idle for a day and then invoke
- A marketing company serves 1,200 propensity models from a SageMaker AI multi-model endpoint on two ml.m5.xlarge instances. Latency has become unpredictable. Amazon CloudWatch shows a low Average for t
- A logistics company hosts 300 route models on a SageMaker AI multi-model endpoint that uses ml.m5.2xlarge instances. Most latency complaints come from first requests to models that must be copied from
- A bank hosts 250 credit-risk models on a SageMaker AI multi-model endpoint. One model, which scores card authorizations, now receives about 70% of all requests and must answer within a strict 50-milli
- A tax-software company hosts a separate scoring model for each of 200,000 customers on a SageMaker AI multi-model endpoint. During filing season, each customer's model is invoked exactly once to score
- Adding a multi-model endpoint model does not require rebuilding the endpoint
To add a compatible model to an existing SageMaker AI multi-model endpoint, upload its artifact to the endpoint's configured S3 location and invoke that model. SageMaker AI loads the requested artifact dynamically, so adding a model does not require an endpoint update.
Trap Creating a production variant for every newly added tenant model, which uses variant-based deployment instead of the endpoint's dynamic model-loading mechanism.
4 questions test this
- An ML engineer adds a new compatible model to an existing SageMaker AI multi-model endpoint by uploading its artifact to the endpoint's Amazon S3 prefix. Before the release, the product owner asks wha
- A fintech company serves per-merchant fraud models from a SageMaker AI multi-model endpoint. Clients call only this endpoint name and pass the target model file name. When a merchant signs up, a pipel
- A company retires the scoring model for a discontinued product line from a SageMaker AI multi-model endpoint that hosts 500 other models. The ML engineer must make sure that the retired model is no lo
- A developer is writing the client code for a SageMaker AI multi-model endpoint after a new churn model was copied to the endpoint's Amazon S3 location as churn-v3.tar.gz. The client already calls Invo
- An inference pipeline runs dependent serving stages in sequence
When inference requires preprocessing, prediction, and postprocessing as a connected sequence, use a SageMaker AI inference pipeline. The containers run in order, passing each stage's output to the next. This keeps the serving transformations with the model instead of requiring the client to coordinate separate stage invocations.
Trap Using direct invocation of one container to run the entire chain, which addresses an individual container rather than serially executing all stages.
4 questions test this
- A healthcare company runs text normalization, a classification model, and label mapping as three containers on three separate SageMaker AI endpoints. Profiling shows that most of the 400-millisecond r
- A retailer trained a demand model with feature transformations written in Spark ML. The same transformations must be applied to individual requests from the ordering application in real time and to a
- A company serves a loan-approval model that needs a scikit-learn featurizer before prediction and a postprocessing step that converts scores to decision codes. Today the client application calls three
- An ML engineer uses the CreateModel API to define a model that must run a feature-encoding container, a prediction container, and a calibration container in sequence on one SageMaker AI endpoint. The
- Direct invocation lets independent containers share an endpoint
When separate models use different frameworks but should share SageMaker AI endpoint resources, a multi-container endpoint can expose containers through direct invocation. Each request selects its intended container rather than traversing an inference pipeline.
Trap Putting incompatible serving frameworks into one multi-model serving container, which assumes the shared-container compatibility that the models do not have.
4 questions test this
- A company hosts an image-quality model and a fraud model, which use different frameworks, on one SageMaker AI multi-container endpoint. The endpoint was configured to run the containers in sequence, s
- A company hosts a claims model and a marketing model, which use different frameworks, on one SageMaker AI multi-container endpoint configured for direct invocation. The marketing analytics application
- A company has four independent models built with TensorFlow, PyTorch, XGBoost, and a custom C++ runtime. Each model runs on its own SageMaker AI endpoint and receives low, steady traffic, so the insta
- An ML engineer deployed a SageMaker AI multi-container endpoint configured for direct invocation that hosts a sentiment container and a topic container. Client requests that call InvokeEndpoint with o
- Inference components give each hosted model its own resource specification
SageMaker AI inference components describe a model and its CPU, accelerator, and memory requirements separately from the endpoint. Use them when several models should share endpoint infrastructure while being added, removed, or updated independently. The resource specification makes allocation explicit rather than assuming every model needs the same share of the host.
Trap Using endpoint traffic weights as GPU-memory reservations, which changes request routing rather than specifying a model's accelerator and memory requirements.
4 questions test this
- A SageMaker AI endpoint hosts four models as separate inference components on shared GPU instances. The data science team retrained one of the models on new data and must roll out the new version this
- A company hosts three fine-tuned language models on one SageMaker AI endpoint that runs on ml.g5.12xlarge instances with four GPUs each. The largest model needs two GPUs and much more memory than the
- A support chatbot model is deployed as an inference component on a shared SageMaker AI endpoint with several other models. During business hours, the chatbot must always have at least two loaded copie
- An ML team wants to consolidate five models on shared SageMaker AI endpoint infrastructure. Two are small CPU-bound classifiers, and three are large language models that need different numbers of GPUs
- SageMaker AI can host compatible models trained outside AWS
A model does not need a SageMaker AI training job to be hosted by SageMaker AI. For an externally trained model supported by an AWS-provided inference container, supply the model artifacts in Amazon S3 and select a compatible framework and version. The hosting configuration also needs a SageMaker AI execution role with access to the required resources.
Trap Retraining an otherwise compatible model solely to obtain a SageMaker AI training-job record, which is not a prerequisite for deployment.
3 questions test this
- An ML engineer creates a SageMaker AI model for an XGBoost model that was trained outside AWS. The model.tar.gz file is in an Amazon S3 bucket in the same Region, and the model uses the SageMaker AI X
- A data scientist trained a model outside AWS with a specific XGBoost version and packaged the model file as model.tar.gz in an Amazon S3 bucket in the deployment Region. The team must host the model o
- A company trained a PyTorch image classifier on its own on-premises GPU cluster. The company now wants to serve the model from a SageMaker AI real-time endpoint without retraining it. The model uses a
- SageMaker AI model artifacts must be in the deployment Region
The S3 bucket containing a SageMaker AI model's artifacts must be in the same AWS Region as the model being created. When moving an externally trained model to another Region, place the artifacts in an appropriate regional bucket before creating the hosting model.
Trap Granting broader S3 permissions to compensate for a cross-Region artifact bucket, which changes authorization but not the regional deployment requirement.
3 questions test this
- A bank hosts an externally trained fraud model on a SageMaker AI endpoint in us-east-1, and its model artifacts exist only in a us-east-1 S3 bucket. The disaster recovery plan requires recreating the
- To serve users in Brazil, an ML engineer copied an externally trained model's model.tar.gz file from a bucket in us-east-1 to a new bucket in sa-east-1. The engineer then ran CreateModel in sa-east-1,
- A European bank trained a credit model outside AWS and uploaded its model.tar.gz file to an S3 bucket in eu-central-1. A data residency rule forbids copying the artifacts to any other Region. A produc
- Custom Model Import brings supported external model weights into Bedrock
When a supported foundation-model architecture has been customized outside Amazon Bedrock and managed Bedrock inference is required, use Custom Model Import. Compatibility with the documented architecture and configuration is a prerequisite; this is an import of model weights, not a generic container-hosting service. Imported models can be invoked with on-demand inference.
Trap Uploading an arbitrary inference Docker image to Custom Model Import, which expects compatible model artifacts rather than a general-purpose serving container.
2 questions test this
- A research team trained a text-embedding model with a custom transformer encoder that it designed itself. The team wants managed, serverless inference and asks whether Amazon Bedrock Custom Model Impo
- A company imported a fine-tuned Mistral model into Amazon Bedrock with Custom Model Import and uses it for interactive chat. The company now wants to run a nightly job that sends 500,000 prompts to th
- Bedrock imports from S3 require supported model files and source access
For a Custom Model Import job whose source is Amazon S3, prepare the model files in Hugging Face weights format and give the import service role access to them. Cross-account buckets and KMS keys require corresponding access grants. A correct file format does not substitute for permission to read or decrypt the source.
Trap Granting only model-invocation permission to the import job role, which authorizes inference rather than reading the source artifacts.
3 questions test this
- An ML engineer starts an Amazon Bedrock Custom Model Import job for a fine-tuned Llama model. The S3 source folder contains only a single PyTorch checkpoint file named model.pt that was saved during t
- An Amazon Bedrock Custom Model Import job in account A reads Hugging Face model files from a bucket in account B. The bucket policy and the import role policy already grant s3:ListBucket and s3:GetObj
- A company's data science account stores fine-tuned model files in Hugging Face format in an S3 bucket. An ML engineer runs a Custom Model Import job from a separate production account, and the job fai
- Existing Kubernetes ML services can move to EKS without model retraining
When an existing Kubernetes deployment already packages ML services as standalone container images, publish those images to Amazon ECR and deploy them to the specified Amazon EKS cluster. Reference the complete ECR image location and provide image-pull permissions. Moving the hosting platform does not itself require changing the trained model or rewriting the workflow into another ML framework.
Trap Rebuilding the services in a new ML orchestration framework for a lift-and-shift requirement, which adds application changes that the existing container deployment does not need.
3 questions test this
- A company moved its ML inference containers to an Amazon EKS cluster that uses managed node groups of EC2 instances. The images are in a private Amazon ECR repository and are referenced by full regist
- A team migrated its Kubernetes model-serving workloads to an Amazon EKS cluster that runs every pod on AWS Fargate. The manifests use full Amazon ECR image names, but pods cannot pull images from the
- A company moved its ML scoring services from an on-premises Kubernetes cluster to an Amazon EKS cluster with managed nodes. The images were pushed unchanged to a private Amazon ECR repository, and the
- Bedrock Provisioned Throughput reserves capacity for supported models
When a supported Bedrock model needs dedicated capacity and consistent throughput, use Provisioned Throughput. On-demand inference is the alternative when usage-based access without a provisioned-capacity commitment meets the workload requirements. Verify the chosen model and Region support the intended provisioning option.
Trap Selecting batch inference to reserve capacity for synchronous application requests, which creates asynchronous jobs instead of a dedicated online serving resource.
3 questions test this
- A contact-center analytics company sends a steady, high volume of summarization requests to a supported Amazon Bedrock base model around the clock. The company needs a guaranteed level of throughput f
- A startup is prototyping an internal writing assistant on a supported Amazon Bedrock base model. Usage is low and irregular, with a few hundred requests on some days and none on others. A team member
- A retailer runs a product-assistant chatbot on a Bedrock base model. For a three-week holiday campaign, the team needs dedicated model capacity with consistent throughput, and on-demand quotas have al
- Bedrock batch inference processes independent prompts through S3 jobs
When a large collection of prompts can be processed asynchronously, submit a Bedrock batch inference job with input files in Amazon S3 and collect the output files from S3. Each input record is processed independently. This mode is not suited to tool-calling conversations that require exchanges between the model and the client.
Trap Submitting an interactive agent tool-use conversation as a batch job, which cannot perform the required back-and-forth tool interactions.
3 questions test this
- A bank serves a live advisory chatbot from a Bedrock Provisioned Throughput purchased for a base model. The team now needs to classify 300,000 historical emails overnight by using the same base model.
- A company wants to run 300,000 support tickets through an Amazon Bedrock model overnight. For each individual ticket, the model must call a get_order_details tool, wait for the order data from the com
- A media company must generate summaries for 400,000 archived articles by using a Bedrock model. Each article is summarized independently, results are needed within a few days rather than in real time,
- Deleting a custom model deployment preserves the underlying custom model
Deleting a Bedrock custom model deployment removes that on-demand serving resource but does not delete its underlying custom model. If inference is needed again, create a new deployment from the retained model. This separates serving-resource cleanup from model retention.
Trap Deleting the underlying custom model to stop using one deployment, which removes the retained model rather than only its serving resource.
3 questions test this
- A company is retiring a fine-tuned Bedrock custom model that was served through an on-demand custom model deployment. The compliance team requires that no Bedrock resource for this model remain afterw
- A team serves a fine-tuned Bedrock custom model through an on-demand custom model deployment. The pilot has ended, and the team must stop the deployment from serving inference without adding any other
- Three months ago, an ML engineer deleted the custom model deployment that served a fine-tuned Amazon Bedrock model for on-demand inference, but kept the custom model itself. A new customer-support pro
- Cross-Region inference profiles route supported model requests across Regions
When the stated deployment permits inference across multiple AWS Regions, a system-defined Bedrock cross-Region inference profile can distribute supported model requests among its defined Regions. The application invokes the profile instead of managing separate regional model invocations itself. Choose a profile whose routing scope meets the application's location requirements.
Trap Using an arbitrary single-Region model identifier to obtain multi-Region routing, which does not select a cross-Region inference profile.
3 questions test this
- A European insurer uses an on-demand Bedrock foundation model from eu-central-1 for claims triage. During monthly peaks, many requests are throttled. Regulations require that inference data is process
- An application calls a Bedrock model with the Converse API. To survive regional throttling, developers maintain separate SDK clients for three US Regions and custom code that retries each throttled re
- A Canadian public agency must process all Bedrock inference requests only in ca-central-1 under its data sovereignty mandate; no other Region may handle the data. Its assistant model supports Provisio
- JumpStart deployment fits foundation models that need control of the hosting environment
When a reusable foundation model must run with explicitly selected SageMaker AI hosting compute and deployment settings, choose a compatible model from SageMaker JumpStart and deploy it to a SageMaker AI endpoint. JumpStart supplies pretrained models while SageMaker AI provides configurable managed hosting. Choose Amazon Bedrock's serverless model access instead when the requirement is to invoke a supported foundation model through an API without selecting and managing its serving infrastructure.
3 questions test this
- A marketing team wants to add text generation to a web application within days. The team has limited ML expertise, does not want to select or manage any servers or instances, and wants to pay per toke
- An ML team wants to deploy an open-weight foundation model from SageMaker JumpStart for a document-classification service. The team must choose the GPU instance type and the instance count, place the
- A company is adding two generative AI features. The first, a contract summarizer, must run an open-weight JumpStart model on a GPU instance type that the security team approved, with an instance count
When a conversational application must use a consistent message-based invocation contract across supported Amazon Bedrock models, use Converse, or ConverseStream when responses must stream. This lets the application reuse its message-handling code across models that support the interface instead of adopting each model's base inference request format. Model-specific inference options can still be supplied separately, so a shared interface does not make every model's capabilities identical.
Trap Using InvokeModelWithResponseStream as the cross-model message abstraction because it streams output, although its request body still follows the selected model's inference format.
3 questions test this
- A software company's chat assistant must let customers choose among several Amazon Bedrock models from different providers. Today the application builds a different InvokeModel request body for each p
- A product team uses the Bedrock Converse API across several foundation models through one shared message-handling module. For one of the models, they need to set an inference parameter that the model
- A support application uses the Bedrock Converse API with messages, a system prompt, and inference settings for several different models. Users now want answers to appear incrementally as the model gen
- Bedrock Marketplace exposes subscribed models through Bedrock APIs with SageMaker AI hosting
When a required foundation model is offered through Amazon Bedrock Marketplace, subscribe to the catalog model and deploy it to a SageMaker AI-managed endpoint. Select the endpoint's instance type and instance count rather than treating this as ordinary serverless Bedrock model access. Invoke the deployment through Bedrock InvokeModel, or Converse for compatible models, using the endpoint ARN to identify the deployment.
Trap Using Custom Model Import to activate a Marketplace catalog subscription, although import requires model artifacts from an external customization environment rather than a catalog subscription.
3 questions test this
- A biotech company needs a specialized protein-sequence foundation model that is offered only through Amazon Bedrock Marketplace. The company wants to call the model through Amazon Bedrock APIs so that
- An application team uses the Amazon Bedrock Converse API for all of its serverless models. The team subscribed to a Bedrock Marketplace model, deployed it to a SageMaker AI endpoint, and confirmed tha
- A company deployed an Amazon Bedrock Marketplace model to a SageMaker AI endpoint with one instance, and its application calls the model through the Bedrock Converse API with the endpoint ARN. Load te
- AgentCore Runtime hosts agent code without requiring a specific framework
When existing agent code needs managed deployment, Amazon Bedrock AgentCore Runtime supports agents built with supported frameworks or custom agent implementations. It is not restricted to foundation models accessed through Amazon Bedrock. This lets a deployment preserve its chosen agent framework and model integration within the Runtime service contract.
Trap Rewriting a working agent to a different framework solely to use AgentCore Runtime, which is framework agnostic.
3 questions test this
- A company built a customer-support agent with LangGraph that calls an OpenAI model through the provider's API. The agent works locally, and the company now needs managed, serverless hosting on AWS wit
- A startup wrote its own lightweight agent loop in plain Python without any agent framework. The loop calls a foundation model, decides which internal functions to run, and keeps conversation state. Th
- A research firm runs a CrewAI multi-agent workflow that can reason over large documents for several hours per request and accepts payloads that combine text and images. The firm needs managed hosting
- AgentCore Gateway exposes existing backends as agent tools
When an agent must use an existing Lambda function or an API described by an OpenAPI specification, AgentCore Gateway can expose that backend through tools compatible with Model Context Protocol. The gateway adapts access to the existing capability; it does not replace the backend's business logic.
Trap Importing API documentation into a knowledge base as a substitute for a tool integration, which makes descriptions retrievable but does not execute the backend action.
3 questions test this
- A retailer has AWS Lambda functions that look up orders, issue refunds, and check inventory. The functions contain tested business logic used by other systems. A new agent must call these capabilities
- A company is building an agent that must call two existing backends: a Lambda function that calculates shipping rates and an inventory REST API that is described by an OpenAPI specification. The agent
- A bank's payments team publishes a REST API with a complete OpenAPI specification. A new loan-servicing agent that the bank is building must call two of the API's operations as tools. The payments tea
- MCP and A2A address different agent communication needs
Use Model Context Protocol when an AgentCore-hosted service exposes tools to agent clients. Use the Agent-to-Agent protocol when the requirement is agent discovery and communication between agents. AgentCore Runtime supports both protocols, but a tool server and a collaborating agent are different integration roles.
Trap Selecting an MCP tool-listing interface as an A2A agent-discovery interface, which substitutes tool discovery for the agent communication contract.
3 questions test this
- A fintech company builds a currency-conversion service that many different agent applications will call to convert amounts and fetch exchange rates. The service performs a fixed set of operations and
- A logistics company is building a customs-clearance agent on AgentCore Runtime. A partner's orchestrator implements only the A2A protocol: it discovers collaborators by fetching their Agent Cards and
- A team built an MCP server that exposes product-search tools to several agent clients. An engineer plans to run it on a self-managed EC2 fleet because the engineer believes AgentCore Runtime hosts onl
- Agent access and tool access require separate authentication paths
AgentCore Runtime supports inbound authentication for clients invoking an agent and outbound authentication for the agent accessing other services. Configure each path for its caller and target, including delegated user access when required. Successful authentication into the agent does not itself establish the agent's credentials for a third-party tool.
Trap Reusing the existence of an inbound authenticated session as proof of downstream API authorization, which leaves the tool's outbound authentication requirement unresolved.
3 questions test this
- A company runs an agent on Amazon Bedrock AgentCore Runtime. Internal batch jobs that run with IAM roles must invoke the agent by using SigV4, and a customer web application must invoke the same agent
- Users sign in with Amazon Cognito to invoke a productivity agent on Amazon Bedrock AgentCore Runtime, and the JWT inbound authorizer works correctly. The agent must now read each user's Google Drive f
- A company hosts an HR assistant agent on Amazon Bedrock AgentCore Runtime. Employees sign in through the company's Amazon Cognito user pool, and only tokens issued to the company's web client should b
- AgentCore applications must implement the selected protocol's service contract
An AgentCore Runtime application must expose the endpoints and message format required by its selected protocol. For example, HTTP request handling and an MCP tool server follow different contracts. Configure the runtime protocol and the application's server consistently rather than deploying a container that merely starts successfully.
Trap Choosing the HTTP runtime protocol for an application that exposes only an MCP server, which mismatches the runtime's expected request interface.
3 questions test this
- A team deploys an MCP tool server to Amazon Bedrock AgentCore Runtime with the MCP protocol selected. The ARM64 container starts without errors and passes its own local tests, but agent clients cannot
- A team deploys a contract-review agent to Amazon Bedrock AgentCore Runtime with the A2A protocol selected so that other agents can collaborate with it. The container listens on port 9000 and accepts J
- An ML engineer deploys an HTTP-protocol agent to Amazon Bedrock AgentCore Runtime. The ARM64 container implements POST /invocations on port 8080, but the server binds to 127.0.0.1 and has no health en
- Bedrock agent action groups separate action definitions from action execution
An Amazon Bedrock Agents Classic action group defines available actions and their inputs through an OpenAPI schema or function details. Configure Lambda execution when Bedrock should pass the selected action and elicited parameters to a Lambda function. Choose return control when the calling application should execute the action instead; Bedrock returns the selected action and parameters in the agent invocation response. The schema describes the available operation, while the chosen execution path supplies its implementation.
Trap Using an AgentCore Gateway tool definition as the Bedrock Agents Classic action-group configuration, even though Gateway adapts backends into MCP tools rather than defining this agent's action group.
3 questions test this
- An ML engineer adds a refundOrder operation to the OpenAPI schema of an existing Amazon Bedrock Agents Classic action group and then prepares the agent. The action group already uses an AWS Lambda fun
- An application calls InvokeAgent on an Amazon Bedrock Agents Classic agent whose WeatherAPIs action group uses return control. The response contains a returnControl object with invocationInputs for ge
- A field-service company uses an existing Amazon Bedrock Agents Classic agent in its tablet app. An action group defines a readLocalWorkOrder function. Work orders are stored only on each tablet, and t
- Client-side Bedrock tool calling requires the application to execute and return tool results
For client-side tool calling in Amazon Bedrock, supply tool definitions with the model request so the model can select a tool and return the inputs it needs. Application code then executes the requested tool and sends its result back in the conversation, allowing the model to continue generation using that result. This model-level interaction is distinct from configuring fulfillment for a Bedrock Agents Classic action group. In supported server-side tool-use configurations, Bedrock executes registered tools on the application's behalf instead; execution ownership depends on the selected mode.
3 questions test this
- An application uses client-side tool calling with the Amazon Bedrock Converse API. The model requests a top_song tool for a radio station call sign that does not exist, and the application's tool code
- A team uses client-side tool calling, so its application code executes every tool that a Bedrock model requests. The security team now wants tool execution centralized in AWS: the team will register a
- A developer uses the Amazon Bedrock Converse API with a toolConfig that defines a get_order_status tool. For a customer question, the response has stopReason set to tool_use and contains a toolUse blo
- A Bedrock agent needs a knowledge-base association and instructions to guide retrieval
When an existing Amazon Bedrock Agents Classic deployment should answer from a Bedrock knowledge base, associate that knowledge base with the agent and provide instructions describing its contents and when to query it. The agent includes these instructions in its prompt context to decide whether retrieval is appropriate for the user's request. Creating and populating the knowledge base alone does not establish this agent integration. Prepare the agent after changing its configuration before testing the retrieval behavior.
Trap Adding an action-group schema as the native knowledge-base integration, although action definitions describe operations and inputs rather than establishing the agent's knowledge-base association.
3 questions test this
- A company runs an Amazon Bedrock Agents Classic agent that handles employee requests. The team created and synced a knowledge base of HR policies, but the agent still answers policy questions from the
- A team edits an existing Amazon Bedrock Agents Classic agent in the agent builder to add a knowledge base of warranty terms with clear instructions on when to use it. In the test window, the agent con
- A company's Amazon Bedrock Agents Classic agent has two associated knowledge bases: one holds HR policies, and the other holds IT runbooks. Both associations use the same instructions, "Company docume
- Code interpretation lets a Bedrock agent execute generated code for analysis and calculations
When an existing Amazon Bedrock Agents Classic deployment must analyze uploaded files, produce visualizations, or perform calculations, enable code interpretation so the agent can generate and run code in a secure test environment. The agent can return results from actual execution rather than only generating code text. Enable Code Interpreter in the agent builder, then save and prepare the agent before testing the changed configuration.
Trap Using an action group's return-control mode as a managed code executor, although that mode sends the selected action and inputs back to application code for fulfillment.
3 questions test this
- A team opens an existing Amazon Bedrock Agents Classic agent in the agent builder, expands Additional settings, and selects Enable for Code Interpreter. Without taking any other action, the team switc
- An ML engineer manages an Amazon Bedrock Agents Classic agent through infrastructure-as-code scripts that call the build-time API. The engineer must turn on the agent's ability to generate and run Pyt
- A finance team uses an existing Amazon Bedrock Agents Classic agent. Analysts want to upload transaction CSV files and receive calculated quarterly totals and charts. The team must not build or operat
- Hybrid retrieval combines semantic similarity with raw-text matching
When knowledge-base queries need both meaning-based matching and raw-text matches, configure hybrid search on a supported vector store with a filterable text field. Semantic search uses vector embeddings alone. Verify the existing store and text-field configuration support hybrid retrieval instead of assuming every vector index can execute it.
Trap Adding a reranker as a substitute for raw-text retrieval when lexical candidates are missing, which only reorders the candidates already retrieved.
3 questions test this
- A team set overrideSearchType to HYBRID on Retrieve requests to an Amazon Bedrock knowledge base whose vectors are stored in a Pinecone index. Queries that contain exact product codes behave the same
- A manufacturer's maintenance assistant queries an Amazon Bedrock knowledge base that is stored in Amazon OpenSearch Serverless with a filterable text field. Technicians ask natural language questions
- A support assistant queries an Amazon Bedrock knowledge base in Amazon OpenSearch Serverless with a filterable text field. Users type questions such as "How do I reset the controller that shows error
- Retrieve separates document retrieval from response generation
Use the Bedrock Knowledge Bases Retrieve operation when the application needs relevant source chunks but will manage generation itself. Use RetrieveAndGenerate when Bedrock should retrieve context and generate an answer with citations. This choice determines whether the managed knowledge-base call owns only retrieval or the combined retrieval-and-generation path.
Trap Calling Retrieve and expecting a synthesized answer with generated citations, which adds a generation responsibility that the retrieval-only operation does not perform.
3 questions test this
- A developer connected an employee FAQ assistant to an Amazon Bedrock knowledge base by calling the Retrieve operation and sending the response to the chat window. Employees now see lists of raw docume
- An internal help desk application must answer employee questions from an Amazon Bedrock knowledge base that indexes policy documents. The team wants one managed API call that retrieves the relevant ch
- A company built an Amazon Bedrock knowledge base over its engineering manuals. Answers must be generated by a fine-tuned model that the company already hosts on a SageMaker AI endpoint, and the applic
- Reranking reorders retrieved candidates for relevance to the query
When retrieval finds candidate documents but their ordering is insufficient, configure a supported reranking model in the Bedrock knowledge-base query. The reranker assesses retrieved candidates for relevance before the selected context is used. It refines retrieval results rather than changing the generation model's sampling behavior.
Trap Lowering generation temperature to improve document ranking, which changes response sampling rather than the ordering of retrieved candidates.
3 questions test this
- A company uses a fully managed Amazon Bedrock knowledge base with managed embedding. Retrieve requests use the default reranking behavior. After an evaluation, the team decides that its relevance resu
- An ML engineer must add a reranker model to existing RetrieveAndGenerate calls on an Amazon Bedrock knowledge base so that retrieved chunks are reordered by relevance before the answer is generated. T
- A support team queries an Amazon Bedrock knowledge base of troubleshooting articles. Evaluation shows that the article that answers a question is usually among the top 20 retrieved chunks but is rarel
- Metadata filters restrict which documents may satisfy a retrieval query
When answers must use documents from a specified department, date range, or category, apply a Bedrock knowledge-base metadata filter. The document metadata must be ingested and supported by the vector store. Filtering constrains the eligible results rather than merely requesting that the language model ignore unwanted sources after retrieval.
Trap Adding a department instruction only to the generation prompt, which does not constrain the documents returned by the retrieval query.
3 questions test this
- A company stores policy documents from several departments in one Amazon Bedrock knowledge base, and each document has a department metadata attribute that was ingested. The HR assistant must answer o
- A news analytics application queries an Amazon Bedrock knowledge base of market reports. Each document has a numeric metadata attribute named epoch_modification_time that stores the last update time i
- An ML engineer adds an equals filter on a region attribute to Retrieve requests for an Amazon Bedrock knowledge base whose data source is an Amazon S3 bucket. Every filtered query returns no results,
- A retrieval result limit is a maximum rather than a guaranteed result count
Bedrock knowledge-base retrieval returns up to the configured number of results. With hierarchical chunking, the limit counts retrieved child chunks, and children sharing a parent can be consolidated into the parent chunk in the response. Consequently, fewer final results can be correct behavior even when the requested limit is higher.
Trap Treating parent-chunk consolidation as missing indexed documents, which mistakes retrieval assembly for an ingestion failure.
3 questions test this
- A knowledge base in Amazon Bedrock uses hierarchical chunking. An ML engineer sets numberOfResults to 10 in Retrieve requests, but many responses contain only 6 results, and several of those results a
- A RetrieveAndGenerate application on an Amazon Bedrock knowledge base fails for some long questions with an error that the prompt exceeds the character limit. The knowledge base uses large fixed-size
- A QA engineer writes an automated test for a RAG service that calls Retrieve on an Amazon Bedrock knowledge base with numberOfResults set to 8. The test fails whenever the response contains fewer than
- Query decomposition breaks a multifaceted question into retrieval subqueries
When one knowledge-base query combines multiple information needs, enable query decomposition to break it into smaller subqueries. Bedrock can execute several retrieval queries and use their results to form the final response. This addresses a broad or compound query rather than simply requesting more candidates for the unchanged query.
Trap Increasing the retrieval result limit as a substitute for separating multiple information needs, which still searches with the original compound query.
3 questions test this
- A company enables query decomposition on RetrieveAndGenerate calls to an Amazon Bedrock knowledge base so that complex comparison questions receive complete answers. The operations team asks what chan
- A company's HR assistant calls RetrieveAndGenerate on an Amazon Bedrock knowledge base. For questions such as "What is the parental leave policy in Germany, and how do I file a relocation expense clai
- An ML engineer is reviewing four types of questions that users send to a RetrieveAndGenerate application on an Amazon Bedrock knowledge base before enabling query decomposition. The engineer wants to
- Implicit filtering uses a metadata schema to derive filters from a query
When users express document constraints in natural language, Bedrock Knowledge Bases can use a supported model and a supplied metadata schema to generate retrieval filters. Describe the available metadata attributes so the model can map user intent to actual fields. Explicit filters remain appropriate when the application already knows the required filter values.
3 questions test this
- A financial research assistant queries an Amazon Bedrock knowledge base of company filings. Documents have company, ticker, and fiscal_year metadata. Users type requests such as "What did Amazon say a
- An ML engineer enabled implicit filtering on Retrieve requests to an Amazon Bedrock knowledge base. The metadata schema lists attributes named cc, fy, and seg, each with an empty description. Generate
- An ML engineer is adding implicit metadata filtering to Retrieve requests for an Amazon Bedrock knowledge base. The engineer has written metadataAttributes schemas for product, region, and release_yea
- Knowledge-base generation can use an explicitly selected guardrail version
When a RAG response path requires Bedrock Guardrails, configure the chosen guardrail identifier and version for knowledge-base response generation. This applies the specified controls to that generation path rather than relying only on prompt wording. Verify that the intended model and guardrail features are supported together.
Trap Adding safety instructions to a prompt as an equivalent to attaching the configured guardrail, which does not enable the managed guardrail controls.
3 questions test this
- A company wants a contextual grounding check from Amazon Bedrock Guardrails on its RetrieveAndGenerate knowledge base application so that answers not supported by the retrieved sources are blocked. Th
- A bank's customer assistant uses RetrieveAndGenerate on an Amazon Bedrock knowledge base. Compliance requires that answers never provide individualized investment advice. The team has added a sentence
- A team configured a guardrail with a sensitive information filter on RetrieveAndGenerate calls to an Amazon Bedrock knowledge base. Testers notice that the generated answers are masked correctly, but
Provision and configure ML and AI workload resources
Read full chapterUnlock with Premium — includes all practice exams and the complete study guide.
Automate orchestration and delivery for ML and AI workloads
Read full chapterUnlock with Premium — includes all practice exams and the complete study guide.
Operating, Monitoring, and Securing ML and AI Solutions
Monitor ML and AI Inference and Performance
Read full chapterCheat sheet
Sharp facts the exam loves — scan these before test day.
- Production drift monitoring needs captured data, a baseline, and a monitoring schedule
For an existing Amazon SageMaker Model Monitor deployment, enable inference data capture, establish baseline statistics and constraints, and configure a monitoring schedule. Capture supplies observations in Amazon S3; the scheduled analysis compares those observations with the baseline and reports violations.
3 questions test this
- An existing SageMaker Model Monitor customer enabled data capture on a pricing endpoint three weeks ago and ran a baseline job on the training data, which produced statistics and constraints files in
- A new team member at an existing SageMaker Model Monitor customer reviews a drift monitoring setup that includes data capture on the endpoint, a baseline built from the training data, and an hourly mo
- A company that already uses SageMaker Model Monitor generated baseline statistics and constraints from a churn model's training data and created an hourly data quality monitoring schedule for the mode
- A legitimate model-data change can require a new monitoring baseline
When a deployed model was deliberately updated for a new validated dataset, regenerate the monitoring baseline from that dataset and update the monitoring schedule to use its statistics and constraints. An old baseline can flag expected changes as violations. Investigate unexpected production drift rather than automatically redefining it as normal.
Trap Retuning model hyperparameters to correct alerts caused by a stale comparison baseline, although hyperparameters do not update the monitor's reference data.
3 questions test this
- An existing SageMaker Model Monitor customer retrains a fraud model monthly in a SageMaker AI pipeline from a newly validated dataset. After each release, the data quality schedule raises violations f
- An existing SageMaker Model Monitor customer released a retrained model after an approved change converted the price feature from dollars to cents. The data quality schedule still uses the old baselin
- An existing SageMaker Model Monitor customer is tired of drift violations. An engineer proposes a nightly job that rebuilds the data quality baseline from the previous day's captured production data w
- Baseline and inference feature schemas must match before drift comparisons are meaningful
Amazon SageMaker Model Monitor expects the baseline and inference datasets to agree on feature count and order. Align the captured input with the training feature schema before interpreting violations. A reordered or additional column can make the monitor compare different features rather than detect a genuine distribution change.
Trap Increasing drift tolerances after a preprocessing column-order change, which relaxes checks without repairing the feature correspondence.
3 questions test this
- A company that already uses SageMaker Model Monitor created a data quality baseline from a CSV export that the analysts use. The export includes a customer_id column between the label and the first fe
- A company that already uses SageMaker Model Monitor sends JSON payloads to an endpoint, and its monitoring schedule uses a preprocessing script that flattens each captured payload into a record. The s
- A company that already uses SageMaker Model Monitor built a data quality baseline from a training CSV file whose columns are 12 features followed by the label. The captured endpoint data lists the pre
- Built-in Model Monitor statistics operate on tabular data
Amazon SageMaker Model Monitor computes built-in statistics and metrics on tabular data. For an image classifier, its tabular prediction outputs can be monitored, but the built-in analysis does not calculate distribution statistics directly over raw image inputs. Image-input drift requires a suitable separate analysis pipeline.
Trap Selecting the built-in tabular analyzer to compare raw image pixel distributions, although that analyzer operates on tabular features.
3 questions test this
- An existing SageMaker Model Monitor customer monitors the predicted labels of a crop-disease image classifier with Model Monitor. Farmers recently switched to new phone cameras, and the team suspects
- An ML engineer at an existing SageMaker Model Monitor customer proposes enabling the built-in data quality analysis on the raw image payloads that a defect-detection endpoint receives, to compare pixe
- A company that already uses SageMaker Model Monitor hosts an image classifier that returns a class label and a confidence score. Reviewers label a sample of the images every day. The team wants weekly
- Existing Model Monitor customers can monitor recurring batch predictions
When predictions are generated by recurring Amazon SageMaker AI batch transform jobs, capture their inputs and outputs and run monitoring against that captured data. Existing Model Monitor customers can monitor batch transform as well as real-time inference. Batch transform support does not extend to every endpoint type: Model Monitor still cannot monitor a multi-model endpoint.
Trap Migrating recurring offline predictions to a permanently running real-time endpoint solely to obtain monitoring, although batch transform data capture is supported.
3 questions test this
- An existing SageMaker Model Monitor customer moved a pricing model from a real-time endpoint to a nightly SageMaker AI batch transform job and enabled data capture on the job. The team reused the old
- An ML engineer at an existing SageMaker Model Monitor customer wants a weekly batch transform job that scores dormant accounts to record its inputs and outputs for drift monitoring. The job is created
- A company that already uses SageMaker Model Monitor scores insurance claims with a nightly SageMaker AI batch transform job. Investigators confirm whether each claim was fraudulent within three weeks,
- Model Monitor observes an inference pipeline as a whole
Amazon SageMaker Model Monitor supports inference pipelines, but its capture and analysis apply to the entire pipeline rather than each container independently. Use the pipeline boundary data for overall quality checks. Diagnosing an intermediate transformation requires additional visibility into that stage.
Trap Using the pipeline's standard capture output as an intermediate-container trace, although capture occurs at the whole-pipeline boundary.
3 questions test this
- An existing SageMaker Model Monitor customer serves a churn model through a SageMaker AI inference pipeline with a feature-transformation container followed by an XGBoost container. Model Monitor runs
- An existing SageMaker Model Monitor customer deployed a three-container SageMaker AI inference pipeline behind one endpoint. The team wants overall data quality monitoring that compares the requests t
- A SageMaker AI inference pipeline endpoint with a preprocessing container, a model container, and a postprocessing container shows a rise in ModelLatency. Model Monitor reports on the pipeline show no
- Missing captured data can reflect disk pressure rather than missing inference traffic
Amazon SageMaker AI data capture stops capturing requests at high disk utilization to avoid affecting inference requests. If endpoint invocations continue but captured records disappear, inspect disk utilization before interpreting the gap as a traffic change. AWS recommends keeping disk utilization below 75 percent for continued capture.
Trap Recreating the drift baseline to repair missing capture records, although baseline generation does not relieve endpoint disk pressure.
3 questions test this
- An existing SageMaker Model Monitor customer sees that the number of captured records in Amazon S3 for a fraud endpoint dropped sharply three days ago, while the endpoint's Invocations metric stayed s
- An existing SageMaker Model Monitor customer lost two days of captured data last month because an endpoint's disk filled up while invocations continued normally. The team wants an early warning before
- A company that already uses SageMaker Model Monitor sees gaps of several hours in the captured data for a document-classification endpoint, while the Invocations metric and the model's responses stay
When Model Monitor is unavailable to a new customer, adapt one of the AWS-published open-source SageMaker AI monitoring solutions, such as the Real-Time Inference Monitoring with Evidently AI + SNS solution, within the existing deployment. Capture production inference observations and configure its scheduled SageMaker Processing analysis to compare recent data with a reference dataset using statistical drift tests. Set the monitoring window, relevant features, and drift thresholds for the workload, retain the resulting metrics and reports, and connect threshold violations to Amazon SNS notifications. This makes distribution monitoring an operational pipeline without depending on a Model Monitor monitoring schedule.
Trap Using endpoint CPU utilization and invocation-error alarms as the distribution-drift detector, because operational health metrics do not compare production feature distributions with reference data.
3 questions test this
- A company became a SageMaker AI customer after SageMaker Model Monitor closed to new customers. It adapted an AWS open-source Evidently AI monitoring solution that runs a scheduled drift analysis of i
- A company started using SageMaker AI after SageMaker Model Monitor closed to new customers. It adapted the AWS-documented lightweight Evidently AI and Amazon SNS monitoring solution for a pricing endp
- A new SageMaker AI customer must add drift monitoring to one existing real-time endpoint that already has data capture enabled. The team wants email alerts only, with the fewest additional components,
- Model Monitor does not support multi-model endpoints
Amazon SageMaker Model Monitor does not support endpoints that host multiple models, even for customers eligible to keep using the service. A workload that must retain a multi-model endpoint therefore needs another compatible monitoring approach. Support for an inference pipeline is a separate capability and does not make multi-model endpoint monitoring eligible.
3 questions test this
- A retailer hosts 40 store-level demand models on one SageMaker AI multi-model endpoint to reduce hosting cost and must keep that hosting design. The company is an existing SageMaker Model Monitor cust
- A company is an existing SageMaker Model Monitor customer and runs Model Monitor data quality schedules on its single-model fraud endpoint. The company is now launching a SageMaker AI multi-model endp
- A company hosts many small fraud models on a SageMaker AI multi-model endpoint. An architect notes that SageMaker Model Monitor supports inference pipelines and proposes placing the multi-model contai
- Model-quality monitoring requires observed outcomes as well as predictions
When an existing Model Monitor deployment must measure production predictive quality, supply ground-truth labels and compare them with captured predictions. Accuracy and similar supervised metrics require known outcomes. Data-quality monitoring instead checks feature statistics and constraints and can operate before outcome labels arrive.
Trap Choosing data-quality constraints to measure prediction accuracy when outcome labels are available, although those constraints describe input data rather than prediction correctness.
3 questions test this
- A company is an existing SageMaker Model Monitor customer and deployed a loan-default model to a real-time endpoint with data capture enabled. Whether a loan defaults is known only about 12 months aft
- A team that already uses SageMaker Model Monitor is setting up two schedules for a demand-forecasting endpoint: one to detect shifts in the input features and one to measure forecast accuracy. A new t
- A retailer is an existing Amazon SageMaker Model Monitor customer. Its churn classifier runs on a real-time endpoint whose data capture configuration records only the request payloads. Each month, the
- Delayed labels must join to the correct captured predictions
Amazon SageMaker Model Monitor merges ground truth with captured predictions using a unique record identifier. A caller-supplied inference identifier takes precedence when present; otherwise the captured event identifier is used. Preserve the matching identifier when outcomes arrive later so quality measurements compare each prediction with its own outcome.
Trap Joining labels to predictions by upload order, although delayed labels need not arrive in prediction order.
3 questions test this
- An ML engineer at an existing SageMaker Model Monitor customer supplies an InferenceId such as ORD-10432 on each invocation. An external labeling vendor returns labels in which the identifiers are con
- An existing SageMaker Model Monitor customer passes its order number as the InferenceId on every endpoint invocation, and data capture records it. The labeling team writes Ground Truth records that re
- An existing SageMaker Model Monitor customer collects shipment-delay outcomes from three carriers. Each carrier reports at a different time, so the Ground Truth records reach Amazon S3 in a different
- Ground-truth files can arrive after the inference period
Model Monitor ground-truth labels are uploaded to Amazon S3 as JSON Lines in time-organized paths. The path date represents label collection time and need not equal the original inference date. Configure the monitoring job with the ground-truth location rather than assuming labels are embedded in the original capture files.
Trap Discarding later-arriving labels because their S3 date differs from the prediction date, although label collection and inference can occur at different times.
3 questions test this
- An existing SageMaker Model Monitor customer exports confirmed churn outcomes from its CRM as a weekly CSV file with columns for customer ID, inference ID, and the churn flag. The model quality job fo
- An existing SageMaker Model Monitor customer plans to add each fraud outcome to the matching record in the endpoint's data capture files in Amazon S3, so that the model quality job can read the labels
- An existing SageMaker Model Monitor customer receives warranty-claim outcomes up to 30 days after each prediction. A data engineer is writing the job that uploads each day's outcomes to the Ground Tru
- Production bias needs its own monitoring beyond overall accuracy
For existing Amazon SageMaker Clarify customers, bias drift monitoring evaluates bias metrics on live prediction data and can expose changes after deployment. A model that passed a training-time bias assessment can behave differently when its production population changes. Use bias metrics and appropriate thresholds to monitor this behavior rather than relying only on aggregate accuracy.
3 questions test this
- A bank is an existing SageMaker Clarify customer. Its credit model passed a post-training bias assessment before launch. Since then, the bank has expanded into a new region whose applicant population
- An existing SageMaker Clarify customer runs bias drift monitoring on a lending endpoint, and the jobs publish both pre-training and post-training bias metrics to CloudWatch. The compliance team must b
- An existing SageMaker Clarify customer monitors an insurance-pricing model. After a marketing campaign, overall accuracy has not changed, but complaints suggest that applicants in one age group now re
- Bias-drift alerts account for uncertainty in the monitored sample
SageMaker Clarify bias-drift monitoring compares the bias metric's confidence interval with the allowed range. An alert is raised when the intervals do not overlap, rather than simply whenever the sample estimate lies outside the allowed range. This reduces alerts caused by noisy estimates from small monitoring windows.
Trap Using a single out-of-range sample estimate as proof of a Clarify bias violation, although the confidence interval may still overlap the allowed range.
3 questions test this
- An existing SageMaker Clarify customer monitors bias drift on a hiring-screening model with an allowed DPPL range of -0.1 to 0.1. This week, Clarify raised a bias drift violation, and the report shows
- An existing SageMaker Clarify customer monitors bias drift with an allowed DPPL range of -0.1 to 0.1. The latest small two-day window produced a DPPL estimate of 0.13, but Clarify raised no bias drift
- An existing SageMaker Clarify customer's data science team wrote a script that reads each bias drift report and pages the on-call engineer whenever the DPPL point estimate is outside the allowed range
- Feature-attribution monitoring detects changes in what drives predictions
When the concern is a change in which features influence a deployed model, existing SageMaker Clarify customers can use feature-attribution drift monitoring. It compares live feature-attribution rankings with a baseline while accounting for baseline importance. This identifies changed prediction drivers even when a general input-quality check does not explain the behavior.
3 questions test this
- A company that already uses SageMaker Clarify runs feature attribution drift monitoring on a real-time insurance-pricing endpoint. A regulator now requires a notification whenever the zip_code feature
- A company that already uses SageMaker Clarify runs data quality monitoring and feature attribution drift monitoring on a credit endpoint. This week, the attribution drift job raised an alert because t
- An existing SageMaker Clarify customer runs data quality monitoring on a pricing endpoint, and it reports no violations. The business reports that prices now seem to depend mostly on a feature that ha
- An on-demand Clarify processing job assesses model bias without a standing schedule
In an existing SageMaker Clarify workflow, launch a processing job programmatically when post-training bias analysis is needed on demand. Configure the input dataset, output location, model or endpoint, and bias-analysis settings, then launch the post-training bias analysis. This is an explicitly submitted analysis job rather than a recurring monitoring schedule.
Trap Launching only pre-training bias analysis when the requirement is to assess bias in a trained model's predictions.
3 questions test this
- An existing SageMaker Clarify customer retrains a hiring-screening model monthly. Before each release, the compliance team requires a post-training bias report on the new model version, generated by a
- An ML engineer at an existing SageMaker Clarify customer writes code with the SageMakerClarifyProcessor class to assess bias in a trained fraud model's predictions across merchant categories. The Data
- A company that already uses SageMaker Clarify must decide whether a newly trained loan model can be released. An analyst ran a Clarify processing job with the pre-training bias methods and found no cl
- Monitoring reports need an alerting integration to notify operators of deviations
In an existing Amazon SageMaker Model Monitor setup, connect the emitted monitoring metrics to Amazon CloudWatch alerting for the selected quality thresholds. Scheduled checks produce the evidence; alarms turn qualifying deviations into notifications. Merely storing a report in Amazon S3 does not configure operator notification.
Trap Treating successful report generation as configured alert delivery, because the notification behavior requires the monitoring and alarm integration.
3 questions test this
- A company that already uses SageMaker Model Monitor runs an hourly model quality schedule for a churn endpoint and sends its metrics to CloudWatch. Single hourly runs often contain few labeled records
- A company that already uses SageMaker Model Monitor publishes the model quality metrics of a fraud endpoint to CloudWatch, and an engineer created a CloudWatch alarm on the recall metric. Last night,
- An existing SageMaker Model Monitor customer emits model quality metrics for a fraud endpoint to CloudWatch. The risk team must be paged only when precision falls below 0.85, and it does not want page
- Production-variant weights distribute live requests between candidates
When comparing model candidates with live traffic, deploy Amazon SageMaker AI production variants and assign their relative traffic weights. Each variant can have its own model and instance configuration. Weighted routing sends each request to a selected variant so its response participates in the production experiment.
Trap Assigning more instances to a candidate as the traffic-split control, although instance count controls capacity and variant weights control weighted routing.
3 questions test this
- A company wants to compare two versions of a pricing model on live traffic with a 70/30 split. A developer proposes deploying each version to its own SageMaker AI endpoint and adding random routing lo
- An ML engineer deploys three production variants of a recommendation model to one SageMaker AI endpoint for an A/B/C test. The endpoint configuration assigns a weight of 3 to variant A and a weight of
- A company serves a fraud model on a SageMaker AI real-time endpoint that runs on CPU instances. The data science team built a candidate model that requires a GPU instance type. The team must compare b
- Explicit variant targeting overrides weighted random routing
When requests from a controlled cohort must reach a specific Amazon SageMaker AI production variant, specify the target variant in the invocation. Explicit targeting takes precedence over the endpoint's traffic weights. Weighted routing is appropriate when the service should choose the variant instead.
Trap Relying on random traffic weights to keep a particular customer's requests on one variant, although weights do not encode that cohort assignment.
3 questions test this
- A company deployed a candidate model as a second production variant on its SageMaker AI endpoint. Until a compliance review finishes, no customer request may reach the candidate. Meanwhile, internal t
- A SageMaker AI endpoint hosts two production variants with a weight of 9 for VariantA and a weight of 1 for VariantB. A partner integration sends every request with the TargetVariant parameter set to
- A company A/B tests a candidate recommendation model as a second production variant on its SageMaker AI endpoint, with weights of 9 for the current variant and 1 for the candidate. A fixed list of 200
- A/B results must retain the identity of the serving variant
Amazon SageMaker AI responses identify the production variant that served the request, and CloudWatch exposes variant-level invocation and latency metrics. Retain that variant identity when comparing prediction-quality outcomes and operational behavior. Endpoint-wide averages blend the candidates and can conceal a poorly performing variant.
Trap Choosing the winning model from a single endpoint-wide latency average, which mixes observations from both candidates.
3 questions test this
- A bank A/B tests a candidate fraud model as a second production variant on a SageMaker AI endpoint, with weights of 80 for the current model and 20 for the candidate. A QA team also sends synthetic ed
- A retailer runs an A/B test of two recommendation models as production variants on one SageMaker AI endpoint with weights of 50 and 50. The business metric is whether a customer buys a recommended ite
- A company sends 5% of its SageMaker AI endpoint traffic to a candidate production variant. The existing CloudWatch alarm fires when the endpoint-wide Invocation5XXErrors rate exceeds 2%. Yesterday, th
- A/B traffic can move to the better variant without recreating the endpoint
After observing better performance from an Amazon SageMaker AI production variant, update the existing variants' desired weights to send it more traffic. The weights-and-capacities update changes the distribution without replacing the endpoint configuration. Continue observing performance as exposure increases before removing the old variant.
Trap Creating a second endpoint solely to alter the traffic split between already deployed variants, although the existing endpoint supports weight updates.
3 questions test this
- An ML engineer's pipeline moves traffic on an Amazon SageMaker AI endpoint from the current production variant to a better-performing candidate in stages of 25%, 50%, and 100%. At each stage, it creat
- An A/B test showed that the candidate variant on a SageMaker AI endpoint performs better. The weights are 9 for the current variant and 1 for the candidate. The ML engineer must raise the candidate's
- An A/B test on a SageMaker AI endpoint showed that the candidate variant, which receives 10% of traffic, performs better than the current variant. The company wants to raise the candidate's share to 5
- First-token latency and completion latency answer different performance questions
For Amazon Bedrock streaming inference, time to first token measures how long a user waits for output to begin, while invocation latency extends to the last token. Monitor the former for perceived responsiveness and the latter for full-response completion. A longer generated answer can increase completion latency without a corresponding increase in the initial wait.
Trap Using full-response invocation latency alone to assess how quickly streaming output starts, although it includes the remaining generation time.
3 questions test this
- A company's chat assistant streams answers from an Amazon Bedrock model through the ConverseStream API. Users complain that answers sometimes take several seconds to begin appearing. The only latency
- After a system prompt change that asks an Amazon Bedrock model for more detailed answers, a streaming application shows that the p50 InvocationLatency rose from 6 seconds to 14 seconds. The p50 TimeTo
- A company's application calls an Amazon Bedrock model with the Converse API and displays each answer only after it is complete. The company is redesigning the user interface to show text as it is gene
- Bedrock runtime metrics distinguish accepted failures from throttled requests
Amazon Bedrock's invocation count includes accepted requests that later produce client or server errors, but excludes throttled requests and requests rejected before processing during input validation. Throttles have their own metric and are not also counted as client or server errors. Interpret these categories separately when investigating inference reliability.
Trap Treating every failed attempt as a server error, which confuses rejected traffic, invalid requests, and failures after acceptance.
3 questions test this
- A deployment introduced a bug that sends malformed request bodies to an Amazon Bedrock model, and Amazon Bedrock rejects these requests during input validation. The operations team sees no change in t
- After a marketing campaign doubled traffic to an Amazon Bedrock application, the InvocationClientErrors metric spiked while the InvocationThrottles metric stayed at zero. The application logs show tha
- A company's dashboard computes the error rate of an Amazon Bedrock application as the sum of InvocationClientErrors and InvocationServerErrors divided by Invocations. During a traffic peak the dashboa
- Foundation-model content quality requires evaluation rather than latency metrics alone
When a production foundation model returns timely but poor answers, use Amazon Bedrock evaluations on prompts representative of the application. CloudWatch runtime metrics describe operational behavior; evaluation jobs assess response effectiveness. A successful API response is not evidence that its content answers the user's question correctly.
Trap Using a low API error rate as the acceptance test for answer quality, although transport success does not assess response correctness.
3 questions test this
- A company's legal-research assistant on Amazon Bedrock answers questions about contract clauses. The team plans to judge answer quality with a public built-in dataset that contains general trivia ques
- An ML engineer shortened the prompt template of an Amazon Bedrock summarization feature. After the change, the p90 InvocationLatency fell by 40% and OutputTokenCount fell by 35%, with no increase in e
- A company plans to accept a new Amazon Bedrock model for its insurance assistant if, during a one-week pilot, the error rate stays below 0.1% and the p90 InvocationLatency stays below 3 seconds. The c
- A judge model can score generated answers and explain its ratings
When ongoing response assessment needs automated qualitative scoring, use an Amazon Bedrock model-evaluation job with a judge model. A second language model assesses the candidate's responses and provides scores with explanations. Select evaluation criteria and representative prompts that reflect the application's requirements.
3 questions test this
- A company's Amazon Bedrock application must return answers as a numbered list of no more than five steps, as the prompt instructs. A weekly sample of 800 production prompts must be scored automaticall
- Customers report that a company's Amazon Bedrock assistant often declines to answer ordinary billing questions. The team changed the system prompt and must now measure, every week and without human re
- A bank's customer-messaging assistant on Amazon Bedrock must use formatting and tone that are appropriate for a professional setting. Compliance reviewers can check only a few responses each week, so
- Human evaluation is appropriate when domain judgment determines response quality
When acceptable production responses depend on expert judgment or user preference, use Amazon Bedrock human-based model evaluation. Employees or domain specialists can rate responses against the chosen criteria. This adds human assessment where programmatic metrics alone do not capture the requirement.
3 questions test this
- A company's agriculture assistant on Amazon Bedrock gives planting advice. An automatic model evaluation job with built-in metrics runs on every release as a regression check and must stay in place. T
- A company has two versions of a customer-email assistant on Amazon Bedrock. The support team leads must decide which version's replies they prefer, because acceptable replies depend on judgment that a
- A pharmacy chain's Amazon Bedrock assistant drafts answers about medication storage. Before each release, licensed pharmacists must mark every sampled answer as either acceptable or not acceptable to
- RAG retrieval relevance and coverage diagnose different retrieval problems
Amazon Bedrock retrieve-only evaluations assess whether retrieved passages are relevant to the question and whether they cover the expected information. Context coverage requires ground-truth text in the evaluation dataset. Use these retrieval metrics when the suspected production failure occurs before answer generation.
Trap Evaluating only generated-answer fluency when investigating missing source passages, although fluent wording does not show whether retrieval found the required evidence.
3 questions test this
- A company's RAG assistant uses an Amazon Bedrock knowledge base. While the generation team rewrites prompts and tries new generator models, the retrieval team must track retrieval quality alone, witho
- A company runs a monthly retrieve-only evaluation of its Amazon Bedrock knowledge base with 200 queries that were written at launch, and the context relevance and context coverage scores stay high. Pr
- A company runs a retrieve-only evaluation of its Amazon Bedrock knowledge base each week with 300 queries that include ground truth texts. This week, context relevance stayed high for nearly all queri
- RAG answer faithfulness measures support in the retrieved evidence
Amazon Bedrock retrieve-and-generate evaluations include faithfulness, which measures whether the response avoids hallucinations relative to retrieved text. Correctness instead assesses how accurately the response answers the question. A response can be relevant and fluent while introducing claims unsupported by the retrieved evidence.
Trap Using retrieval context relevance as the only measure of answer faithfulness, although a model can invent details after receiving relevant passages.
3 questions test this
- A company's Amazon Bedrock knowledge base assistant answers employee questions about benefits. The HR team's acceptance criterion is that answers resolve the employee's question accurately according t
- A company runs a weekly retrieve-and-generate evaluation of its Amazon Bedrock knowledge base assistant. The team must distinguish two failure types in each report: answers that add claims not support
- A company's Amazon Bedrock knowledge base assistant must answer only from the company's policy documents. Reviewers found answers that state accurate industry facts that appear nowhere in the retrieve
- CloudWatch generative AI observability brings invocation metrics and prompt-level evidence together
Amazon CloudWatch generative AI observability provides prebuilt views for investigating generative AI workloads rather than requiring every monitoring view to be assembled from scratch. Its Model Invocations dashboard combines model usage, token consumption, latency, errors, and a curated invocation-log table that shows input and output content once Amazon Bedrock model invocation logging sends logs to CloudWatch Logs. End-to-end prompt tracing, curated metrics, and logs help correlate an application symptom with the responsible model, retrieval, or tool operation when the required telemetry is available.
Trap Using Amazon Bedrock model evaluation alone to investigate a live invocation's latency and errors, because response-quality scoring does not provide the correlated operational request path.
3 questions test this
- An ML engineer opens the Model Invocations dashboard in CloudWatch generative AI observability for an application that uses Amazon Bedrock. The invocation count, latency, and token graphs are populate
- Since this morning, users of a company's application on Amazon Bedrock report slow and failed answers. The application calls three foundation models, and model invocation logging to CloudWatch Logs is
- A company's support agent uses an Amazon Bedrock knowledge base, two tools, and a foundation model, and sends its telemetry to CloudWatch. Average response time doubled after a data update, but the Mo
- Production feedback should refresh evaluation cases and guide targeted application updates
Use privacy-controlled production prompts, failed answers, and explicit user ratings to refresh representative evaluation cases for a foundation-model application. Review and correct those cases against reliable ground truth rather than treating generated answers or ratings as verified answers. Recurring failures can reveal changed user questions, unclear prompts, or missing retrieval knowledge, guiding prompt adjustments or retrieval-data updates and subsequent evaluation. Protect customer interactions under the applicable privacy and regulatory requirements before reusing them.
Trap Reaching immediately for model fine-tuning when failed answers concern a newly released product, because updating missing retrieval information may address the knowledge gap without changing model weights.
3 questions test this
- A bank wants to add real customer conversations with its Amazon Bedrock assistant to the evaluation dataset so that the evaluation covers current questions. The conversations include account numbers a
- A company evaluates its Amazon Bedrock customer-support assistant each quarter with a golden dataset that was written two years ago, and the scores remain high. User ratings have dropped because custo
- A company's Amazon Bedrock assistant uses a knowledge base. Negative user ratings rose after the company began serving small-business customers. Logs show that the right passages are retrieved, but th
- Agent execution traces locate the failing step in a coordinated workflow
When a production agent fails during a sequence of model and tool calls, inspect the execution path and intermediate outputs in Amazon Bedrock AgentCore Observability. Step-level traces identify where coordination diverged or a tool operation failed. An end-to-end error count indicates frequency but does not identify the failed dependency.
4 questions test this
- A company runs a customer-support agent on Amazon Bedrock AgentCore Runtime. In each session the agent calls a foundation model, an order-lookup tool, and a refund tool in sequence. The agent code is
- A company runs a supervisor agent and two specialist agents as separate agents on Amazon Bedrock AgentCore Runtime. The supervisor delegates subtasks to the specialists over HTTP. All three agents are
- An ML engineer operates a travel-booking agent on Amazon Bedrock AgentCore Runtime with ADOT instrumentation and CloudWatch Transaction Search enabled. Users report that some itineraries contain the w
- A company's loan-assistant agent on Amazon Bedrock AgentCore Runtime calls a credit-check tool, a document-retrieval tool, and a foundation model in each session. After a release, the runtime Latency
- AgentCore built-in metrics do not automatically expose every internal tool step
Amazon Bedrock AgentCore emits built-in operational metrics, while additional application spans and traces require agent-code instrumentation. Enable the necessary observability outputs and instrument internal operations when debugging tool calls or multi-step coordination. OpenTelemetry-compatible telemetry supports correlation with the rest of the monitoring stack.
Trap Enabling a runtime metric dashboard as the only change needed for custom tool-level traces, although internal operations still require instrumentation.
4 questions test this
- A company runs an insurance-quote agent on Amazon Bedrock AgentCore Runtime with ADOT instrumentation. The operations team must receive an alarm when the agent's pricing tool returns no price for more
- An ML engineer added the ADOT SDK to an agent on Amazon Bedrock AgentCore Runtime and redeployed it. The built-in runtime metrics continue to appear in CloudWatch, but the GenAI observability console
- A company deployed an agent to Amazon Bedrock AgentCore Runtime and views its built-in runtime metrics, such as Invocations, Latency, and System Errors, in CloudWatch. The ML engineer now needs spans
- A company's microservices already emit OpenTelemetry traces that the platform team analyzes in CloudWatch. The ML engineer is deploying an agent to Amazon Bedrock AgentCore Runtime that calls two of t
- A stream's stop reason distinguishes completion, truncation, and tool handoff
Amazon Bedrock ConverseStream reports why a message stopped. Reaching the output-token limit indicates a length-limited answer; a tool-use stop indicates that the application must handle the tool request; a guardrail intervention indicates filtering. Inspect the stop reason before treating every ended stream as a completed answer.
Trap Treating a tool-use stop as a network truncation and retrying generation, although the model is requesting a tool interaction.
4 questions test this
- A company streams responses from a foundation model through the Amazon Bedrock ConverseStream API. The operations team must track what percentage of responses are cut off by the output-token limit and
- A company's support chatbot calls the Amazon Bedrock Converse API with a guardrail attached. The operations dashboard counts every response whose stopReason is not end_turn as a model failure. The fai
- An ML engineer is building an order-status assistant that calls the Amazon Bedrock ConverseStream API with a tool definition for an order-lookup function. In testing, many streams end after a short me
- A company is adding automated handling to an agent that calls the Amazon Bedrock ConverseStream API with tools configured. The current code treats every stream that closes without an exception as a co
- A successful initial response does not guarantee a successful response stream
Streaming inference can encounter an error after the initial response has already been sent. Amazon SageMaker AI exposes a mid-stream error metric for these failures. Monitor stream completion and streaming errors rather than recording success solely from the initial response.
Trap Counting every stream with a successful initial status as a successful inference, which misses errors after streaming has begun.
4 questions test this
- A company serves an LLM from a SageMaker AI real-time endpoint, and clients call InvokeEndpointWithResponseStream. Users report that some streamed answers stop partway through, but the endpoint's Invo
- An ML engineer is building a client-side dashboard that reports the success rate of streamed responses from a SageMaker AI endpoint that the client invokes with InvokeEndpointWithResponseStream. The c
- A company's application calls the Amazon Bedrock ConverseStream API and records each request as successful when the API call returns its initial response. Occasionally a stream delivers part of an ans
- A company's SageMaker AI endpoint streams LLM responses, and request volume varies tenfold between night and day. The ML engineer must alarm when more than 2% of streamed requests fail after the initi
- Transient workflow failures should have bounded retries and a recovery path
For transient failures in an AWS Step Functions task, configure retries with increasing delays and a finite attempt limit. A matching catch handler provides a recovery path when the error remains after retry handling. This separates temporary service failures from failures that need explicit fallback or investigation.
Trap Routing the first transient failure directly to a permanent-failure branch, which bypasses the configured opportunity for recovery.
4 questions test this
- An ML engineer's AWS Step Functions workflow runs a SageMaker AI batch transform job through a Task state. The Task state has a Retry field with exponential backoff and three attempts for a transient
- A company's AWS Step Functions workflow calls a SageMaker AI endpoint through an AWS Lambda function. To ride out throttling, a developer gave the Task state a retrier with an IntervalSeconds of 5, a
- A company's AWS Step Functions workflow uses a Map state to start a SageMaker AI processing job for each of 40 data batches. Occasionally a job fails with a transient internal error and succeeds when
- A company's AWS Step Functions workflow uses a Task state to invoke an AWS Lambda function that calls a SageMaker AI endpoint for each batch of records. During traffic peaks, the function occasionally
- Retry jitter reduces synchronized recovery traffic
When many agent or inference tasks fail together, use jitter in AWS Step Functions retry delays to spread subsequent attempts over time. Exponential backoff increases the delay between retries, while jitter randomizes when each retry occurs. Combining them reduces the chance that clients repeatedly retry in lockstep.
Trap Giving every failed task the same fixed retry interval, which keeps recovery attempts synchronized.
4 questions test this
- A company's AWS Step Functions workflow scores 300 customer accounts in parallel each night. When a shared feature service fails, all of the scoring tasks fail together. The retrier uses IntervalSecon
- A company's AWS Step Functions workflow fans out 120 agent tasks in parallel, and each task calls the same Amazon Bedrock model through an AWS Lambda function. The Task state's retrier sets IntervalSe
- A company's AWS Step Functions workflow uses a Map state to send up to 200 documents at a time to a SageMaker AI endpoint through an AWS Lambda function. When the endpoint throttles, many iterations f
- An ML engineer's AWS Step Functions workflow uses an inline Map state to summarize 40 documents in parallel. Each iteration runs a Task state that calls an Amazon Bedrock model through an AWS Lambda f
- Task timeouts bound stalled workflow steps
For an agent or processing step orchestrated by AWS Step Functions, configure a task timeout and a matching recovery path so a stalled operation does not wait indefinitely. Heartbeat monitoring can detect a worker that stops reporting progress in workflows that use heartbeats. Route the resulting failure to the appropriate handler rather than counting the unfinished task as healthy.
Trap Increasing the retry count to detect an operation that never returns, although retries begin only after an error is reported.
4 questions test this
- An ML engineer's AWS Step Functions workflow uses an activity worker to run a document-labeling job that can legitimately take up to 4 hours. When the worker process crashes, the execution waits for t
- A company's AWS Step Functions workflow uses an activity worker on Amazon EC2 to run a feature-extraction step for each batch. Occasionally the worker hangs and never reports success or failure, and t
- An ML engineer added TimeoutSeconds to an AWS Step Functions Task state that runs a SageMaker AI processing job. The state also has a Catch field whose ErrorEquals list contains only States.TaskFailed
- A company's AWS Step Functions workflow calls a long-running data-processing service through a Task state. Some calls never return. A team member proposes raising MaxAttempts in the Task state's retri
- Pipeline-step metrics distinguish a slow stage from an overall workflow failure
Amazon SageMaker AI publishes pipeline execution metrics and separate step metrics for failures, successes, and duration. Use the pipeline and step dimensions to identify the stage responsible for a processing or inference-workflow regression. Overall execution duration alone cannot identify which step changed.
Trap Scaling the inference endpoint after seeing only a longer pipeline duration, although the delay may be in an upstream processing step.
4 questions test this
- A company's SageMaker AI pipeline runs a batch inference step and then two reporting steps that sometimes fail after the inference results are already written. The ML team reports a weekly success rat
- A company's SageMaker AI pipeline uses a condition step to decide whether to run a batch transform step and a model registration step. Since a parameter change last week, executions finish in half the
- A company's SageMaker AI pipeline has five steps that prepare features, validate them, run a batch transform job, evaluate the output, and publish results. The ExecutionFailed metric shows about one f
- After an instance upgrade made the training step of a SageMaker AI pipeline faster, the pipeline's total ExecutionDuration stayed flat even though its feature engineering step became 40% slower. Nobod
- AgentCore runtime application logs do not automatically include the agent's response
Amazon Bedrock AgentCore runtime application logs include invocation request payloads and correlation identifiers but do not capture the agent response. If investigating incorrect returned content requires output visibility, instrument the application to record the necessary response information under the approved data-protection policy. A request payload in the runtime log is not evidence that the corresponding response was also captured.
Trap Searching only the built-in runtime application log for the generated response, although those records do not include a response payload.
4 questions test this
- During an incident review, an ML engineer finds a runtime application log record from an agent on Amazon Bedrock AgentCore Runtime. The record contains the customer's request_payload and the session_i
- An ML engineer is adding response logging to an agent on Amazon Bedrock AgentCore Runtime, because the runtime application logs record only the request_payload with tracing fields. During investigatio
- A company's customer-service agent on Amazon Bedrock AgentCore Runtime returned incorrect refund amounts to several customers. The ML engineer opens the agent's runtime application log records in Clou
- An agent on Amazon Bedrock AgentCore Runtime calls a foundation model and then reformats the model output with pricing data from a tool before it returns the final answer. Customers received wrong pri
Optimize ML and AI Costs and Performance
Read full chapterUnlock with Premium — includes all practice exams and the complete study guide.
Secure ML and AI Workloads and Endpoints
Read full chapterUnlock with Premium — includes all practice exams and the complete study guide.