Machine Learning Specialty · 20% of the exam

Data Engineering: free practice questions

5 sample questions from our 50-question bank for this domain — answers and explanations included. These are the same scenario-based style as the real AWS exam.

1. A financial services company must demonstrate reproducibility of their ML models to regulators. They need to track which version of a training dataset, which preprocessing script, and which set of hyperparameters produced each model artifact. Which AWS service provides built-in ML lineage tracking to satisfy this requirement?

  • A. AWS Glue Data Catalog versioning
  • B. Amazon SageMaker ML Lineage Tracking✓ Correct
  • C. AWS CloudTrail with S3 data events
  • D. Amazon SageMaker Experiments
Explanation

Amazon SageMaker ML Lineage Tracking automatically records the relationships between datasets, processing jobs, training jobs, models, and model package versions, creating a directed acyclic graph (DAG) of lineage that can be queried to prove reproducibility. AWS Glue Data Catalog versioning tracks changes to table schemas in the catalog but does not capture training job parameters, model artifacts, or end-to-end ML pipeline lineage. AWS CloudTrail records API calls and can show who ran what, but it does not build queryable ML-specific lineage graphs linking data to models. SageMaker Experiments tracks metrics, parameters, and artifacts per run, which overlaps with lineage tracking, but it is focused on experiment comparison rather than formal lineage provenance required for regulatory reproducibility audits.

2. A data engineering team stores 4 TB of JSON-formatted IoT sensor readings in Amazon S3. They plan to use Amazon EMR with Apache Spark for large-scale feature engineering. A data scientist reports that Spark jobs read the entire dataset even when only two of the twenty fields are needed. Which TWO changes would MOST reduce data scanned per job? (Select TWO)

  • A. Convert the JSON files to Apache Parquet format, preserving the original schema.✓ Correct
  • B. Enable S3 Transfer Acceleration on the bucket to increase read throughput.
  • C. Partition the S3 data by a high-cardinality field such as device_id to allow predicate pushdown.
  • D. Partition the S3 data by a time-based field (e.g., event_date) that aligns with common query filter patterns.✓ Correct
  • E. Compress the JSON files using gzip to reduce the bytes transferred from S3.
  • F. Increase the EMR master node instance type to process metadata faster.
Explanation

Converting to Parquet (Option A) enables columnar projection pushdown so Spark reads only the two needed columns from each file, drastically reducing I/O. Partitioning by event_date (Option D) enables partition pruning when queries filter by time range, which is the most common pattern for time-series IoT data. Option B (S3 Transfer Acceleration) speeds up uploads/downloads over the internet but does not reduce the amount of data scanned. Option C (partitioning by device_id) is a high-cardinality key that would create millions of tiny partitions, causing excessive metadata overhead and small-file problems without meaningful scan reduction. Option E (gzip compression) reduces bytes transferred but gzip is not splittable—Spark cannot read compressed blocks in parallel, which can worsen performance. Option F (larger master node) does not affect data scanning; the master node manages job coordination, not data reads.

3. A media company ingests live video-event metadata into Amazon Kinesis Data Streams at a peak rate of 80,000 records per second. A downstream AWS Glue Streaming ETL job consumes the stream to compute per-user feature aggregations for a real-time recommendation model. The team observes that the Glue streaming job consistently falls behind, and the GetRecords.IteratorAgeMilliseconds CloudWatch metric is steadily increasing. The Kinesis stream currently has 10 shards. What is the MOST likely cause of the lag, and what should the team do to resolve it?

  • A. The Glue streaming job is bottlenecked on writing output to Amazon S3; enable S3 multipart upload to improve write throughput
  • B. The Kinesis stream does not have enough shards to support the incoming throughput; reshard the stream to at least 40 shards to match the ingestion rate
  • C. The Glue streaming job does not have enough Data Processing Units (DPUs) allocated; increase the number of DPUs assigned to the job✓ Correct
  • D. Amazon Kinesis Data Streams has a default retention period of 24 hours; extend the retention period to 7 days to prevent record expiry
Explanation

A rising IteratorAgeMilliseconds metric indicates the consumer is falling behind the producer. Since each Kinesis shard supports up to 2 MB/s read throughput and a Glue streaming job's parallelism is governed by the number of DPUs, increasing DPUs adds more parallel workers that can read from shards concurrently, directly addressing consumer-side lag. — Resharding the stream to 40 shards would be needed only if write throughput (1 MB/s or 1,000 records/s per shard) were exceeded; 10 shards support up to 10,000 records/s write and 80,000 records/second at an assumed small record size likely fits within the shard write limit. The bottleneck here is described as the consumer job, not the stream capacity. — Enabling S3 multipart upload improves write performance to S3 but is not the primary bottleneck described; the metric points to the processing job falling behind the stream, not write latency. — Extending the retention period prevents records from expiring but does not address the root cause of consumer lag; it only buys more time before records are lost, not faster processing.

4. A financial services company needs to build a feature store pipeline. Raw transaction events are produced by 20 upstream systems with heterogeneous schemas into Amazon Kinesis Data Streams. A team wants to join these streams with daily-updated reference data (merchant category codes) stored in S3, compute aggregated features (e.g., 7-day rolling transaction count per customer), and write features to both the online store (low-latency reads) and offline store (training). Which architecture satisfies ALL requirements with the LEAST operational overhead?

  • A. Use Apache Flink on Amazon Kinesis Data Analytics for stream processing and feature computation, writing to Amazon SageMaker Feature Store (online + offline) via a custom Flink sink✓ Correct
  • B. Use AWS Glue Streaming ETL with a Glue Data Catalog connection to Kinesis, perform joins with S3 reference data using Glue DynamicFrames, and write output to SageMaker Feature Store
  • C. Use Amazon Kinesis Data Firehose to buffer all 20 streams into S3, trigger a daily AWS Glue batch job to compute rolling features, and write results to an Amazon DynamoDB table as the online store and S3 as the offline store
  • D. Deploy a self-managed Apache Kafka cluster on Amazon EC2, use Kafka Streams for feature computation, and write to ElastiCache Redis as the online store and Redshift as the offline store
Explanation

Amazon Kinesis Data Analytics (now Amazon Managed Service for Apache Flink) provides a fully managed Flink environment that natively supports stateful stream processing required for 7-day rolling window aggregations, stream-to-stream and stream-to-batch (S3 reference data) joins, and low-latency output. Writing to SageMaker Feature Store simultaneously populates the online store (backed by DynamoDB for low-latency reads) and offline store (backed by S3), meeting all requirements with no server management. AWS Glue Streaming ETL supports simple transformations but has limited support for complex stateful windowed aggregations like 7-day rolling counts and lacks native SageMaker Feature Store sink connectors, requiring custom code. Using Kinesis Firehose and daily batch Glue jobs converts the problem to batch processing, eliminating the ability to compute up-to-date rolling features and missing the low-latency online store update requirement. A self-managed Kafka cluster on EC2 with custom Kafka Streams logic has the highest operational overhead (cluster management, patching, scaling) and requires building custom integrations with Redis and Redshift.

5. An ML platform team uses AWS Lake Formation to govern a shared data lake used by three business units. A new regulation requires that data scientists in the Finance unit can query a 'transactions' table but must never see the 'customer_ssn' column. All other columns should remain accessible. Which Lake Formation capability satisfies this requirement with the LEAST operational overhead?

  • A. Create a separate S3 prefix that contains a version of the transactions table with the customer_ssn column removed, and grant the Finance unit's IAM role access only to that prefix.
  • B. Use Lake Formation column-level permissions to explicitly deny the 'customer_ssn' column for the Finance unit's IAM principals on the transactions table.✓ Correct
  • C. Write an AWS Glue ETL job that redacts the customer_ssn column before writing a sanitized copy of the table to a separate S3 location, and point the Finance unit to that location.
  • D. Enable S3 Block Public Access and use a bucket policy condition to block access to objects containing customer_ssn values.
Explanation

Lake Formation supports fine-grained column-level access control directly on Data Catalog tables. By revoking SELECT permission on the 'customer_ssn' column for the Finance unit's principals, the team enforces the policy without duplicating data or maintaining separate ETL jobs. Option A creates data duplication and adds maintenance burden every time the schema changes. Option C (Glue ETL redaction job) also duplicates data and adds pipeline complexity; any schema change requires updating the job. Option D (S3 Block Public Access + bucket policy) operates at the S3 object level and cannot filter individual columns within a file—it is also unrelated to column-level security.

45 more questions in this domain

Practice the full bank with instant grading, flashcards, and a timed mock exam.

Start practicing free