MLA-C02 sample questions with answers

10 free practice questions for the AWS Certified Machine Learning Engineer – Associate (MLA-C02) exam. Try each one, then open the answer to see why the right option wins and every other option loses.

Question 1Data Preparation for ML and AI

A new team in an account that has never used it plans to run SageMaker Clarify processing jobs for pre-training bias metrics and SHAP explanations on a tabular credit model. They discover they cannot start. What is the documented position, and what replacement does AWS describe for a predictive tabular workload?

  1. A.

    Clarify is closed to new customers; AWS describes computing the standardised bias metrics directly with pandas and scikit-learn and using the SHAP library that Clarify itself is built on, operationalised in a pipeline with SageMaker AI MLflow, CloudWatch and QuickSight.

  2. B.

    Clarify remains available but processing jobs have been replaced by a real-time API, so the team should call the bias and explainability endpoints directly instead of submitting jobs.

  3. C.

    Clarify is closed to new customers and Amazon Bedrock Evaluations is the designated replacement for all of its capabilities, including pre-training bias metrics and SHAP attributions on tabular models. Bedrock Evaluations accepts tabular datasets directly and produces the same pre-training bias report that Clarify processing jobs used to emit.

  4. D.

    Clarify is closed to new customers and the documented replacement is to enable SageMaker Model Monitor bias drift monitoring, which computes the same pre-training metrics without a Clarify job.

Show answer

Answer: A

Clarify is closed to new customers; the documented replacement computes the standardised metrics and SHAP directly inside your own pipeline.

  • A. Matches the documented replacement guidance for predictive tabular bias detection and explainability.
  • B. Clarify is closed to new customers; processing jobs were not replaced by a real-time API.
  • C. The documentation states Bedrock Evaluations applies to foundation models only and is not a replacement for predictive bias or explainability.
  • D. Model Monitor is itself among the SageMaker AI features closed to new customers, and its bias drift baselines were produced by Clarify.
Question 2Data Preparation for ML and AI

A team lands gzip-compressed CSV exports in Amazon S3 and registers an Athena table over the prefix. Queries return rows full of unreadable binary characters instead of values. A second prefix produced by a Windows tool writes files with a .GZ suffix and behaves the same way. The files decompress correctly with local tools. What is wrong?

  1. A.

    For CSV, TSV and JSON, Athena determines the compression type from the file extension and treats files with no extension as uncompressed plain text; uppercase extensions such as .GZ are not recognised, so both prefixes must use lowercase gz extensions.

  2. B.

    The table's SerDe is missing the compression table property, so Athena defaults to no compression; adding write.compression = GZIP to TBLPROPERTIES makes existing files readable.

  3. C.

    Athena cannot read gzip-compressed text files at all and requires that text data be converted to Parquet or ORC before it can be queried, regardless of how the files are named. The unreadable characters in the result are the compressed bytes being rendered as text, which is the expected outcome for an unsupported storage format.

  4. D.

    Gzip files must be concatenated into a single object per partition because Athena cannot open multiple independently compressed members in one prefix, which produces the binary output observed.

Show answer

Answer: A

Athena infers compression for text formats from the file extension, and uppercase extensions are not recognised.

  • A. Both documented rules apply here: extension-derived compression for text formats and non-recognition of uppercase extensions.
  • B. Compression table properties specify what Athena writes; they do not override extension-based detection for existing text files.
  • C. Athena reads GZIP-compressed text files normally; GZIP is a supported compression format.
  • D. Athena reads many independently compressed files in a prefix, and can even mix compression formats within one table.
Question 3Data Preparation for ML and AI

To cut training start-up latency, a team wants to stage both the training input and the model output in an S3 Express One Zone directory bucket collocated with the training instances. Their security standard requires that all artefacts written by the platform be encrypted with a customer managed AWS KMS key. What should the team conclude?

  1. A.

    S3 Express One Zone cannot be used as a training data source at all, because SageMaker AI input modes require a general purpose bucket; the team must fall back to FSx for Lustre for low-latency access. The team should accept the VPC configuration and single Availability Zone subnet that a Lustre file system requires.

  2. B.

    The directory bucket can serve as the training input location, but SageMaker AI output data in a directory bucket can only be encrypted with SSE-S3, so the output must be written elsewhere to satisfy the KMS requirement.

  3. C.

    The requirement is satisfied automatically, because objects in directory buckets inherit the bucket key configuration of the general purpose bucket that the directory bucket is linked to.

  4. D.

    Directory buckets support SSE-KMS with customer managed keys for both input and output, so the team only needs to grant the training role kms:Decrypt and kms:GenerateDataKey on the key.

Show answer

Answer: B

SageMaker AI output to an S3 Express One Zone directory bucket supports only SSE-S3, not SSE-KMS.

  • A. S3 Express One Zone is explicitly supported as a training input location across file, fast file and pipe modes.
  • B. Matches the documented split: directory buckets are supported for training input, but output encryption is limited to SSE-S3.
  • C. Directory buckets are an independent bucket type; they do not inherit encryption configuration from a general purpose bucket.
  • D. SSE-KMS is not currently supported for SageMaker AI output data stored in directory buckets, so the key grants would not help.
Question 4Data Preparation for ML and AI

A Glue job uses the Detect PII transform configured to detect fields containing PII, with a sample portion and a detection threshold set to keep cost down. An audit later finds unredacted national insurance numbers in a free-text notes column where only a small minority of rows contain one. What explains the miss, and what is the correct configuration?

  1. A.

    Detecting fields containing PII scans only a sample of rows and labels a column as containing an entity only when the proportion of sampled rows carrying it meets the detection threshold, so a sparse entity in a wide column is missed; detecting PII in each cell scans all rows and is the setting for this case.

  2. B.

    Free-text columns are excluded from column-level detection because their inferred type is not a recognised sensitive data type, so a fine-grained action override is needed to include the column in the scan.

  3. C.

    The transform does not include a UK national insurance number pattern among its managed entities, so the column was scanned correctly but the entity type was never looked for; a custom detection entity with a regular expression is required.

  4. D.

    The global detection sensitivity was left at its default of Low, which reduces false positives by detecting fewer entities; raising it to High makes the sampled scan detect the sparse entity.

Show answer

Answer: A

Column-level PII detection samples rows and applies a threshold, so sparse entities in a column can fall below it.

  • A. Accurately describes sampling plus detection threshold as the cause and cell-level scanning as the correct mode.
  • B. Free-text columns are scanned normally; fine-grained overrides include or exclude columns and change actions, but exclusion is not automatic.
  • C. UK national insurance number is among the managed country-specific entity categories the transform can detect.
  • D. High is the default sensitivity for jobs created after November 2023, and sensitivity does not override the sampling threshold logic.
Question 5Data Preparation for ML and AI

A team built a retrieval feature on an existing OpenSearch Serverless Classic vector search collection. Two requirements from the new product spec are failing: an integration test that writes a document and immediately searches for it is flaky, and the data science lead wants to evaluate an IVF index to trade recall for memory. What should the team be told?

  1. A.

    Vector collections support IVF but only through the model training API, and read-after-write is immediate; the flaky test indicates a client-side retry problem rather than a service behaviour.

  2. B.

    Both requirements are met by enabling the Lucene ANN engine on the collection, which supports IVF and provides synchronous refresh on write for indexes below the serverless size threshold. Enabling the engine is a collection-level setting that can be applied without recreating any of the existing indexes.

  3. C.

    Classic vector collections support only HNSW with Faiss and do not support IVF, and their index refresh interval means a write is not immediately searchable, so the test must tolerate the refresh delay.

  4. D.

    Both limitations are removed by scaling the collection's OpenSearch Compute Units above the default maximum, because refresh behaviour and available algorithms are functions of allocated capacity.

Show answer

Answer: C

Classic vector collections support only HNSW with Faiss and have a documented refresh interval, so writes are not instantly searchable.

  • A. The model training API operations are unsupported on these collections, and read-after-write is not immediate.
  • B. The Lucene ANN engine is explicitly unsupported on vector search collections, and refresh is not synchronous.
  • C. Both statements are in the documented limitations list for Classic vector search collections.
  • D. Refresh interval and supported algorithms are service behaviours, not functions of allocated compute units.
Question 6Data Preparation for ML and AI

A Glue job merges two regional exports. One region writes a customer identifier as an integer and the other writes it as a string. After reading both into DynamicFrames the merged schema shows that column as a choice with two members, and the downstream write to Parquet fails. The team must keep every row and must not discard either representation. Which resolution should they apply?

  1. A.

    Convert both DynamicFrames to Spark DataFrames with toDF before the union, because DataFrames infer a common supertype for conflicting columns automatically and never fail on this.

  2. B.

    Apply the relationalize transform to both frames, which resolves choice types by pivoting each conflicting field into its own child table joined back by a generated key. The two typed representations then appear as sibling rows in the child table, which the merge logic can reconcile without losing anything.

  3. C.

    Apply resolveChoice with cast:long, which converts every value to a single numeric type and is therefore the safest option when the column is an identifier.

  4. D.

    Apply resolveChoice with make_cols, which splits the ambiguous field into one column per type so no value is lost, then reconcile the two columns explicitly in the merge logic.

Show answer

Answer: D

make_cols splits a ChoiceType into one column per type, preserving every value; cast can lose non-convertible values.

  • A. Spark DataFrames require a fixed schema and do not resolve conflicting types by inferring a supertype in this way.
  • B. relationalize flattens nested structures and pivots arrays into child tables; it is not the mechanism for resolving a ChoiceType.
  • C. Casting can silently lose or null values that do not convert, which violates the requirement to keep every row.
  • D. make_cols preserves every value by emitting one typed column per member of the choice, matching the stated constraint.
Question 7Data Preparation for ML and AI

A fraud team is building features for a card-authorisation model. Overnight, a batch job must join five years of transaction history, several billion rows, against merchant and account dimension tables and compute windowed aggregates in SQL before writing the training set to Amazon S3. At authorisation time the model needs the small set of precomputed counters for a single card returned in well under a millisecond, at tens of thousands of requests per second; those counters are rebuilt hourly and can be regenerated from source if they are lost. Which two stores fit these two requirements? (Choose two.)

Choose 2.

  1. A.

    Hold the hourly counters in an Amazon ElastiCache cache and read them from the authorisation path.

  2. B.

    Load the transaction history into Amazon DocumentDB and run the nightly aggregation with its MongoDB-compatible aggregation pipeline.

  3. C.

    Run the overnight join and windowed aggregation in an Amazon Redshift data warehouse, then unload the resulting training set to Amazon S3.

  4. D.

    Model transactions, cards and merchants in Amazon Neptune and compute the nightly aggregates with openCypher queries.

  5. E.

    Register the transaction files with AWS Lake Formation and serve both the nightly aggregation and the authorisation-time lookups through its permissions layer.

Show answer

Answer: A, C

Redshift is the columnar warehouse for the overnight analytic join; ElastiCache is the in-memory store for the sub-millisecond counter reads.

  • A. ElastiCache is an in-memory store that serves sub-millisecond reads at very high request rates, and the counters are small, derived and rebuildable, which is exactly when a cache rather than a durable primary store is right.
  • B. DocumentDB is a MongoDB-compatible document database tuned for operational JSON workloads. It is not a columnar MPP warehouse, so the five-year multi-billion-row join would be slow, and it does not meet the sub-millisecond bar either.
  • C. Redshift is a petabyte-scale columnar data warehouse built for large analytic SQL joins and window functions, and UNLOAD writes the result to S3 in a format training jobs can read.
  • D. Neptune is a graph database. It excels at traversing relationships such as rings of linked accounts or shared devices, not at the columnar scans and window aggregates this nightly job performs.
  • E. Lake Formation governs and secures data-lake access; it is a permissions and catalogue layer over data that other engines query. It is neither a query engine nor a low-latency key-value store, so it answers neither requirement.
Question 8Data Preparation for ML and AI

A vision team stores several million images in Amazon S3 with their bounding-box annotations in an augmented manifest file, so that labels travel with the object references. To shorten job start-up they switched the training input from file mode to fast file mode. The job now refuses the input configuration. What is the constraint, and what are the options?

  1. A.

    Fast file mode requires that the manifest be stored in the same prefix as the objects it references; moving the augmented manifest alongside the images resolves the configuration error.

  2. B.

    Fast file mode supports Amazon S3 prefixes only and does not support manifest or augmented manifest files; the team must keep file mode for the augmented manifest, or restructure the data so labels are not carried in a manifest.

  3. C.

    Augmented manifest files are supported only in pipe mode, and fast file mode replaced pipe mode entirely, so the team must first convert the manifest to RecordIO-protobuf and then use fast file mode. Fast file mode then streams the converted records from the prefix on demand without needing the manifest at all.

  4. D.

    Augmented manifests require the ShardedByS3Key distribution type, which is incompatible with fast file mode's on-demand streaming; setting FullyReplicated allows fast file mode to accept the manifest.

Show answer

Answer: B

Fast file mode supports S3 prefixes only; manifest and augmented manifest files require file mode.

  • A. Manifest location is not the issue; fast file mode does not accept manifests at all.
  • B. Fast file mode's documented restriction to S3 prefixes is exactly the constraint, and file mode is the mode that accepts augmented manifests.
  • C. Pipe mode is largely replaced by fast file mode but augmented manifests are a file-mode capability, and no RecordIO conversion is implied.
  • D. ShardedByS3Key is a file-mode distribution option for distributed training; it is not a prerequisite of augmented manifests.
Question 9Data Preparation for ML and AI

A team is scoring divergence between the outcome distributions of two facets in a multimodal dataset. One outcome category has no observations at all for the disadvantaged facet. They want a bounded, symmetric summary that they can compare across modalities and that behaves sensibly given that empty category. Which metric family should they choose, and why?

  1. A.

    Kullback-Leibler divergence, because it is the only pre-training metric defined for multicategory outcomes and it handles empty categories by assigning them a divergence of zero. Its range starts at zero and is unbounded above, which makes it directly comparable between numeric, text and image modalities without rescaling.

  2. B.

    Difference in Proportions of Labels, because it is symmetric by construction and its normalised range makes it directly comparable between numeric, text and image modalities.

  3. C.

    Jensen-Shannon divergence, because it is a symmetrised and smoothed measure of how much the outcome distributions of different facets diverge, which makes it better behaved than the raw asymmetric divergence when a category is empty for one facet.

  4. D.

    Class Imbalance, because with an empty outcome category the divergence metrics are undefined and only a count-based measure of facet representation remains valid.

Show answer

Answer: C

Jensen-Shannon is the symmetrised, smoothed divergence and is better behaved than raw KL when a category is empty for one facet.

  • A. KL is not the only multicategory metric, is asymmetric, and does not simply assign zero to empty categories.
  • B. DPL compares proportions of positive outcomes rather than whole outcome distributions, so it summarises less.
  • C. JS is the symmetrised smoothed divergence and is the appropriate choice given an empty category for one facet.
  • D. Divergence metrics remain usable; Class Imbalance measures representation, not outcome distribution.
Question 10Data Preparation for ML and AI

A team min-max scaled a transaction amount feature to the unit interval. Inspection of the scaled column shows that more than ninety-nine percent of the values now sit in a narrow band near zero, because a handful of legitimate very large corporate transfers set the maximum. Model performance on ordinary transactions has fallen. What is the appropriate correction?

  1. A.

    Re-apply min-max scaling to a wider target range so that the compressed values are spread across a larger interval, which restores the resolution lost in the unit interval. Because the transform is linear, widening the range preserves the ordering while giving the model far more numeric separation to work with.

  2. B.

    Remove the scaling entirely, because tree-based and linear models are both invariant to monotone rescaling of a single numeric feature and the scaling step added no value.

  3. C.

    Scale the column using statistics that are robust to outliers, such as a robust scaler based on quantiles, or clip the extreme values to a quantile bound before scaling, so the bulk of the distribution retains resolution.

  4. D.

    Replace min-max scaling with max absolute scaling, which divides each value by the maximum absolute value and is therefore unaffected by the presence of extreme values.

Show answer

Answer: C

Min-max scaling is dominated by extreme values; robust scaling or clipping preserves resolution in the bulk of the distribution.

  • A. Widening the target range rescales the same compressed shape; the relative compression is unchanged.
  • B. Distance-based and gradient-based models are sensitive to feature scale, so removing scaling is not a general fix.
  • C. Robust scaling and quantile clipping are the documented remedies when extreme values dominate a scaled column.
  • D. Max absolute scaling divides by the maximum absolute value, so it is equally dominated by the extreme values.

Keep going with 891 more MLA-C02 questions

Free papers every day, in the real exam formats, with progress by exam domain. Unlock every paper and timed mock exam when you are ready.

MLA-C02 sample questions with answers (10 free) · CertifyAIx