All AWS exams
Free AWS Certified Machine Learning - Specialty practice test: 30 questions with answers
30 original questions for AWS Certified Machine Learning - Specialty, drawn from every topic area. Answer each one to see whether you got it right and why. No sign-up.
- Free questions
- 30
- Full bank
- 112 questions
- Real exam
- 65 questions, 180 min
AWS Certified Machine Learning - Specialty exam guide: topics, cost and format
All 30 AWS Certified Machine Learning - Specialty questions with answers
The same questions as the test above, grouped by exam topic. Open any question to see the answer and explanation.
ML Implementation and Operations (8 questions)
Question 1
A deployed model's input data distribution changes over time, and the team wants an alert when it drifts. Which SageMaker capability should be used?
- ASageMaker Model Monitor, which detects data quality and drift against a baseline and raises alerts
- BSageMaker Debugger, which inspects tensors and training issues during a training job rather than in production
- CSageMaker Neo, which compiles models for specific hardware targets and does not monitor production data
- DSageMaker Edge Manager, which manages models on devices and does not compare live distributions to a baseline
Show answer and explanationHide answer
Correct answer: AModel Monitor compares production data to a baseline and raises drift alerts. Debugger, Neo and Edge Manager do not monitor live distribution drift.
Question 2
A team must deploy a new model version to a production endpoint with minimal risk, and roll back quickly if quality drops. Which deployment strategy fits?
- AShift a small share of traffic to the new variant, monitor, then increase the share or roll back
- BReplace the production model in place with no test traffic, and wait for user complaints to decide on rollback
- CDeploy the new model to a separate AWS account only, with no connection to production traffic at all
- DStop the endpoint for a day while the new model is copied to it, then start it with the new version
Show answer and explanationHide answer
Correct answer: ACanary or gradual traffic shifting with monitoring allows a fast rollback. In-place replacement, a separate account with no traffic and downtime each carry more risk or no validation.
Question 3
An ML pipeline must run retraining automatically when new labelled data arrives in S3 and promote the model only if it passes evaluation. Which service orchestrates this?
- AAmazon SageMaker Pipelines, with a condition step that promotes the model only when the metric passes
- BA manual notebook run by a data scientist every Monday, with the decision recorded in a shared document
- CAn Amazon SNS topic that emails the team when data arrives, so that the team starts training by hand
- DA cron job on a laptop that copies the model file to the production bucket without any evaluation step
Show answer and explanationHide answer
Correct answer: ASageMaker Pipelines with a condition step automates retraining with an evaluation gate. Manual runs, email alerts and unevaluated copies do not provide the automated, gated promotion.
Question 4
Which approach keeps the training and inference environments reproducible across teams?
- AKeep the model artefacts only on the instance where they were trained, so that they are never copied elsewhere
- BInstall packages on each instance by hand at the time of training, using whatever versions are available that day
- CVersion the training code, container image, data references and hyperparameters, and record them with each model
- DName the model files with the date only, so that the team can find the one trained on a given day
Show answer and explanationHide answer
Correct answer: CVersioning code, container, data references and hyperparameters, recorded with each model, makes runs reproducible. Hand installs, local-only artefacts and date names do not.
Question 5
A model endpoint must scale automatically with request volume while keeping latency low. Which configuration is appropriate?
- ARoute all requests through a single Lambda function that loads the model from S3 on every invocation
- BSet a fixed instance count large enough for the peak, and never change it even when traffic falls to near zero
- CRun the model on a single very large instance with no scaling policy, relying on the instance size alone
- DConfigure an auto scaling policy on the endpoint variant, based on invocations per instance
Show answer and explanationHide answer
Correct answer: DAn auto scaling policy on the endpoint variant scales with invocations. Fixed peak sizing wastes cost, a single instance cannot absorb spikes, and loading the model per invocation is slow.
Question 6
A team must prevent personal data in training logs and artefacts from being exposed. Which controls help most?
- AUse the root account for all training jobs so that access never fails and no roles need to be managed
- BStore training data in a public bucket so that the team can share it easily with external reviewers
- CPrint each training record into the job logs so that data issues can be spotted quickly during the run
- DEncrypt data with AWS KMS keys, restrict access with least-privilege IAM roles, and avoid logging raw records
Show answer and explanationHide answer
Correct answer: DKMS encryption, least-privilege IAM and avoiding raw record logging protect personal data. Public buckets, printed records and root use each expose data or break least privilege.
Question 7
A training job is slow and the team wants to find GPU bottlenecks during training. Which SageMaker feature helps?
- ASageMaker Ground Truth, which manages labelling workflows for creating the training data before training
- BSageMaker Batch Transform, which runs predictions over stored data after the model has been trained
- CSageMaker Feature Store, which stores the features that are used by training and inference across teams
- DSageMaker Debugger, which captures tensors and system metrics during the training job for analysis
Show answer and explanationHide answer
Correct answer: DSageMaker Debugger captures system metrics and tensors during training to find bottlenecks. Batch transform, Feature Store and Ground Truth do not profile training.
Question 8
Which two practices help protect a model endpoint? (Choose two.)
- AUse IAM policies to limit which principals may invoke the endpoint
- BExpose the endpoint publicly without authentication, so that clients never face access problems
- CPlace the endpoint in a VPC with private access where the callers are internal
- DEmbed the AWS credentials in the client application code, so that every client can call the endpoint
- EDisable encryption in transit between the client and the endpoint, to reduce request latency
Show answer and explanationHide answer
Correct answer: A, CIAM policies limit invocation, and private VPC access keeps the endpoint off the public internet. Public access without authentication, embedded credentials and disabled encryption each expose the endpoint.
Modeling (8 questions)
Question 9
A team trains a model on a time series of sales. Which validation strategy avoids leakage from the future into training?
- AA random shuffle of all rows before splitting, so that every period appears in training and testing
- BA time-based split, where training data precedes the validation and test periods
- CUsing the test set repeatedly to choose hyperparameters, so that the best model is found quickly
- DTraining on the full dataset and reporting the accuracy on the same data used for training the model
Show answer and explanationHide answer
Correct answer: BA time-based split keeps the future out of training, which matches how the model will be used. Random shuffles, repeated test use and training-set evaluation each leak information.
Question 10
A model is overfitting: training accuracy is high, but validation accuracy is much lower. Which change is most likely to help?
- AAdd regularisation, collect more representative training data, or reduce model complexity
- BIncrease model complexity, since a more complex model always generalises better to unseen data
- CRemove the validation set entirely, so that the model has more data to fit during training runs
- DTrain for more epochs without any change, since overfitting disappears as training continues indefinitely
Show answer and explanationHide answer
Correct answer: ARegularisation, more representative data or lower complexity reduce overfitting. Greater complexity, removing validation and extra epochs without change make it worse.
Question 11
Which SageMaker capability runs many training jobs with different hyperparameter settings to find the best configuration?
- ASageMaker Edge Manager, which manages models deployed to edge devices in the field
- BBatch transform, which runs predictions over a large dataset stored in Amazon S3
- CSageMaker Ground Truth, which creates labelled training data through human annotation workflows
- DAutomatic model tuning (hyperparameter tuning jobs)
Show answer and explanationHide answer
Correct answer: DAutomatic model tuning runs many training jobs over hyperparameter ranges to find the best configuration. Batch transform, Ground Truth and Edge Manager serve other purposes.
Question 12
A team needs a model that makes predictions for an entire dataset overnight, with no real-time endpoint required. Which SageMaker option fits best?
- AA notebook instance that loads the model and predicts row by row while an analyst watches the output
- BA real-time endpoint kept running all day and night, receiving each record one at a time from a loop
- CBatch transform jobs, which run inference over the dataset in S3 and write the results back to S3
- DA Lambda function triggered once per record, which calls the model for each row in the dataset
Show answer and explanationHide answer
Correct answer: CBatch transform runs offline inference over a dataset without a persistent endpoint, which matches overnight processing. Always-on endpoints, manual notebooks and per-record Lambda calls are costly or unsuitable.
Question 13
Which algorithm family is most suitable for a problem where the outcome is a continuous numeric value, such as predicting house prices?
- AA clustering algorithm such as k-means, which groups records without any numeric outcome to predict
- BA regression algorithm, such as linear regression or gradient boosted trees for regression
- CAn anomaly detection algorithm such as random cut forest, which flags unusual records rather than predicting values
- DAn association rule miner, which finds items that frequently occur together in transactions
Show answer and explanationHide answer
Correct answer: BRegression algorithms predict continuous outcomes. Clustering, anomaly detection and association rule mining solve different problems.
Question 14
Which SageMaker built-in algorithm is designed for detecting anomalies in numeric data streams?
- AXGBoost, which is a supervised algorithm used for classification and regression with labelled targets
- BRandom Cut Forest, which detects anomalous records in numeric data without labels
- CLinear Learner, which is used for supervised regression and classification tasks on labelled data
- DObject2Vec, which learns embeddings for pairs of items rather than detecting anomalies in streams
Show answer and explanationHide answer
Correct answer: BRandom Cut Forest is the built-in algorithm for unsupervised anomaly detection on numeric data. XGBoost, Linear Learner and Object2Vec are supervised or embedding methods.
Question 15
A team wants to reduce the number of input features to speed up training while keeping most of the variation in the data. Which technique fits?
- ADuplicating the most important features many times, which increases their weight in the model
- BAdding random noise to every feature, which increases the number of features the model must process
- CPrincipal component analysis, which projects the data onto components that capture most of the variance
- DConverting every numeric feature to a text string, so that the model treats each value as a category
Show answer and explanationHide answer
Correct answer: CPCA reduces dimensions while retaining most variance. Adding noise, duplicating features and converting to text do not reduce dimensions usefully.
Question 16
Which two practices reduce the risk of data leakage during model evaluation? (Choose two.)
- AFit preprocessing steps on the training data only, then apply them to validation and test data
- BUse the test set to choose hyperparameters repeatedly, since the test set is the most representative
- CInclude features that are only known after the outcome occurs, since they improve offline accuracy
- DSplit data by entity or time where records are related, so that near-duplicates do not cross the split
- EReport the best of many training runs on the test set, rather than a single pre-agreed evaluation
Show answer and explanationHide answer
Correct answer: A, DFitting preprocessing on training data only and splitting by entity or time prevent leakage. Repeated test use, post-outcome features and selecting the best test result each inflate performance.
Data Engineering (7 questions)
Question 17
A company streams clickstream events into Amazon S3 with Kinesis Data Firehose. Data scientists need the files converted to Parquet and partitioned by date for Athena queries. Which approach fits best?
- AStore the events as individual JSON files in one flat prefix and let Athena scan all files for each query
- BConfigure Firehose record format conversion to Parquet with an AWS Glue Data Catalog table, and partition the S3 prefix by date
- CLoad the events into a single Amazon DynamoDB table and query it with Athena using a federated connector
- DWrite a nightly cron job on an EC2 instance that copies the data to a local disk and converts it manually
Show answer and explanationHide answer
Correct answer: BFirehose record format conversion to Parquet with a Glue catalog table, and date-partitioned prefixes, minimises scanned data for Athena. Flat JSON scans everything, DynamoDB is not suited to analytical scans, and manual EC2 conversion adds operational work.
Question 18
A team must ingest terabytes of historical CSV data into S3 and make it available to SageMaker with schema discovery. Which service should catalogue the schema?
- AAWS Config, which records resource configuration changes rather than data schemas and table structures
- BAmazon Macie, which discovers sensitive data in buckets but does not catalogue table schemas
- CAWS Glue crawlers, which infer the schema and register the tables in the Glue Data Catalog
- DAmazon CloudWatch Logs, which stores log events and does not hold table definitions for analytics
Show answer and explanationHide answer
Correct answer: CGlue crawlers infer schemas and populate the Glue Data Catalog, which SageMaker and Athena use. Macie, Config and CloudWatch Logs do not catalogue table schemas.
Question 19
Which option is most appropriate for storing features that must be served in real time with low latency and reused across training and inference?
- AA local CSV file on the training instance, copied to the endpoint container during each deployment
- BAn Amazon S3 bucket with one object per feature, read with a full scan by the inference endpoint each time
- CAn Amazon Redshift cluster queried synchronously by the inference endpoint for each prediction request
- DAmazon SageMaker Feature Store, with an online store for inference and an offline store for training
Show answer and explanationHide answer
Correct answer: DSageMaker Feature Store provides an online store for low-latency inference and an offline store for training, with consistent features. The other options do not meet real-time, consistent feature reuse.
Question 20
A data pipeline must remove duplicate records and enrich them with reference data at scale on Amazon EMR. Which approach is most suitable?
- AA manual spreadsheet process where analysts remove duplicates by hand each week before training
- BA single-threaded Python script on one laptop that loads the whole dataset into memory at once
- CA Spark job on EMR that deduplicates on key columns and joins the reference dataset from S3
- DAn SQS queue with one consumer that processes each record and discards any duplicates it sees
Show answer and explanationHide answer
Correct answer: CA Spark job on EMR scales deduplication and joins across large datasets. A laptop script, manual spreadsheets and a single consumer do not scale or are not reliable at this size.
Question 21
Training data in Amazon S3 contains personal information. The team must find and protect that data before training. Which service helps discover it?
- AAmazon Athena, which queries the data but does not identify which fields contain personal information
- BAmazon Macie, which discovers and classifies sensitive data such as personal identifiers in S3
- CAmazon EventBridge, which routes events between services and does not inspect the content of objects
- DAWS Trusted Advisor, which checks account configuration and does not classify the data itself
Show answer and explanationHide answer
Correct answer: BAmazon Macie discovers and classifies sensitive data in S3. Athena queries data without classifying it, while EventBridge and Trusted Advisor do not inspect object content.
Question 22
Which two practices improve the reliability of a feature engineering pipeline? (Choose two.)
- AVersion the transformation code and record the parameters used to fit each transform
- BCompute feature statistics on the full dataset, including the test set, before splitting it
- CHard-code the timestamps of each record in the transformation code, so that they never change
- DUse different code for training features and inference features, so that each is tuned separately
- ESkip validation of input schemas, so that the pipeline never fails on an unexpected column
Show answer and explanationHide answer
Correct answer: A, DVersioned transformations with recorded fit parameters make pipelines reproducible, while schema validation catches bad input. The other options cause leakage, brittleness or inconsistency.
Question 23
A company receives image files from thousands of devices. The team needs to store them cheaply and process each new upload automatically with a model. Which architecture fits?
- AStore uploads in S3 and trigger a Lambda or Step Functions workflow with an S3 event notification
- BStore uploads on an EBS volume attached to one EC2 instance that polls the directory every minute
- CSend each image to an Amazon RDS database as a binary large object and query it for processing
- DEmail each image to a shared mailbox that a data scientist checks manually each morning
Show answer and explanationHide answer
Correct answer: AS3 with event notifications triggering a workflow processes uploads automatically at low cost. Polling EBS, storing images in RDS and manual mailbox checks do not scale or automate the flow.
Exploratory Data Analysis (7 questions)
Question 24
A dataset has a target class that is only 0.5 percent of the records. Which evaluation approach gives a more meaningful measure of model quality than accuracy?
- AThe mean of the training loss over all epochs, which summarises the model's fit to the data
- BAccuracy alone, since a model that is correct on most records is always the best model for the business
- CPrecision, recall and the F1 score, or the area under the precision-recall curve
- DThe number of training records, which indicates how large the dataset is for the learning task
Show answer and explanationHide answer
Correct answer: CWith a rare class, precision, recall, F1 and the precision-recall curve reveal performance on the minority class, which accuracy hides. Accuracy, training loss and dataset size do not show minority-class quality.
Question 25
A feature has many missing values, and the team wants to keep the rows. Which approach is most appropriate before training?
- ADelete every row that contains any missing value, even when most of the feature values are present
- BImpute the missing values using a method suited to the feature, and record that imputation was applied
- CReplace all missing values with zero without considering whether zero is a meaningful value for the feature
- DIgnore the missing values and let the algorithm treat them as the largest possible number in the feature
Show answer and explanationHide answer
Correct answer: BAppropriate imputation keeps the rows and is recorded for reproducibility. Dropping all rows loses data, zero fill may be meaningless, and treating blanks as large numbers distorts the model.
Question 26
Two numeric features are on very different scales and the model is sensitive to scale. Which preprocessing step should be applied?
- AStandardisation or normalisation, fitted on the training data and applied to validation and test data
- BRemoving one of the features entirely, since scale differences always make the second feature useless
- CMultiplying all values by one million so that the features have comparable magnitude in every row
- DConverting both features to text labels so that the scale no longer matters to the learning algorithm
Show answer and explanationHide answer
Correct answer: AStandardisation or normalisation fitted on training data avoids leakage and aligns scales. Removing features, arbitrary multiplication and converting to labels do not address the issue properly.
Question 27
A team suspects that a feature in the training data leaks the label, because it is recorded after the outcome. What is the appropriate action?
- ARemove the leaking feature, since it would not be available at prediction time and inflates offline results
- BKeep the feature, since a feature that predicts the label well is the most valuable one for the model
- CKeep the feature but increase the number of training epochs, so that the model learns to ignore it
- DRename the feature to a neutral name, which removes the leakage without changing any of its values
Show answer and explanationHide answer
Correct answer: AA feature recorded after the outcome leaks the label and would not exist at prediction time, so it must be removed. Keeping it, adding epochs and renaming do not remove the leakage.
Question 28
A team wants to explore a large dataset interactively in S3 with visualisations, without managing servers. Which AWS option fits best?
- AA shared spreadsheet that is refreshed by hand each morning from an exported CSV file
- BSageMaker Studio notebooks, with data loaded from S3 and visualised with standard libraries
- CA hand-built web server that renders charts from a database table, maintained by the team
- DA printed report of the dataset's first row, reviewed by the analysts at their desks each week
Show answer and explanationHide answer
Correct answer: BSageMaker Studio notebooks let teams explore S3 data interactively without managing servers. Manual spreadsheets, hand-built servers and printed rows do not meet the requirement well.
Question 29
A regression model has residuals that grow with the predicted value. Which step is most appropriate?
- ADelete all high-value rows from the training data, so that the residual pattern disappears from the plot
- BIgnore the residuals, since a model's residuals never matter for predictions made in production
- CTransform the target, such as with a logarithm, and reassess the residual pattern
- DIncrease the learning rate until the residuals stop changing from one training run to the next
Show answer and explanationHide answer
Correct answer: CA transformation such as a logarithm can stabilise variance, then the residual pattern is reassessed. Ignoring residuals, deleting high-value rows and tuning learning rates do not address heteroscedasticity.
Question 30
Which visual analysis helps reveal the relationship between two numeric features before modelling?
- AA table listing only the first ten rows of the dataset, which shows the earliest records in order
- BA pie chart of the first feature's values, which shows the share of each unique value in the data
- CA word cloud of the feature names, which shows which names occur most often in the dataset
- DA scatter plot of the two features, optionally coloured by the target
Show answer and explanationHide answer
Correct answer: DA scatter plot shows how two numeric features relate, and colouring by the target adds insight. Pie charts, word clouds and first-row tables do not show the relationship.