1.2.1

Question Answer & Explanation
### Question 1 - Visual Data Cleaning without Code

A retail company has terabytes of raw sales data stored in Amazon S3. Data analysts need to clean and profile this data by removing duplicates, handling missing values, and applying standardization, but they do not have strong coding skills. The solution must minimize operational overhead and strictly avoid writing custom Apache Spark or Python scripts.

Which AWS tool should the team use to fulfill these requirements?

- A) Use SageMaker Data Wrangler to interactively build a data flow and export it to an AWS Lambda function.
- B) Use AWS Glue DataBrew to create a visual recipe of cleaning steps and run a DataBrew job.
- C) Use Amazon EMR to provision a Spark cluster and write PySpark scripts to clean the data.
- D) Use AWS Glue Studio to author a custom PySpark ETL job for data profiling and cleaning.
Correct Answer: B

Correct Answer Analysis:
- B is Correct: AWS Glue DataBrew is a visual data preparation tool that allows users to create "recipes" of cleaning and transformation steps without writing any code. It is designed for analysts and data scientists to profile, clean, and transform data with minimal operational overhead.

Distractor Analysis:
- A is Incorrect: While SageMaker Data Wrangler is low-code, it is designed for interactive ML feature engineering within the SageMaker ecosystem, and exporting to Lambda is not a standard execution pattern for large ETL jobs.
- C is Incorrect: Amazon EMR requires writing custom PySpark scripts and managing cluster infrastructure, violating the "no coding" and "minimal operational overhead" constraints.
- D is Incorrect: AWS Glue Studio provides a visual interface for creating ETL workflows, but it still generates and often requires tweaking of custom PySpark scripts, violating the "strictly avoid writing custom scripts" constraint.

> Exam Tip: For visual, no-code data profiling and cleaning recipes across multiple datasets, AWS Glue DataBrew is the preferred AWS tool.
### Question 2 - Complex Spark Workloads and Custom UDFs

A financial services firm needs to process 50 TB of transaction data daily to engineer features for an XGBoost model. The transformation logic requires complex Apache Spark libraries and custom user-defined functions (UDFs) that are not natively supported by standard serverless AWS Glue environments. The engineering team wants full control over the underlying cluster infrastructure to optimize performance and install custom dependencies.

Which AWS tool is best suited to meet these requirements?

- A) AWS Glue DataBrew
- B) Amazon EMR
- C) AWS Glue ETL
- D) SageMaker Data Wrangler
Correct Answer: B

Correct Answer Analysis:
- B is Correct: Amazon EMR provides managed Apache Spark clusters with full control over the underlying infrastructure. It allows engineers to install custom libraries, use advanced Spark features, and tune hardware configurations (like GPU instances) that serverless AWS Glue does not support.

Distractor Analysis:
- A is Incorrect: AWS Glue DataBrew is a visual tool and does not support writing or integrating complex custom Spark UDFs.
- C is Incorrect: AWS Glue ETL is serverless and abstracts away the infrastructure. It does not allow the level of custom OS-level dependency installation or deep cluster tuning required for specific complex Spark libraries/UDFs.
- D is Incorrect: SageMaker Data Wrangler is designed for interactive, low-code data preparation on smaller scales and does not support running custom Spark UDFs across a managed cluster in the same way EMR does.

> Exam Tip: Choose Amazon EMR over AWS Glue when you need custom libraries, complex Spark UDFs, specific hardware (GPUs), or deep cluster tuning control.
### Question 3 - Native SageMaker Pipeline Integration

An ML engineer is preparing a dataset for model training. They need to interactively explore the data, generate visualizations, perform feature engineering (like scaling and encoding), and seamlessly export the entire transformation flow into an Amazon SageMaker Pipeline for automated, repeatable re-training. The solution must require the least amount of custom orchestration code.

Which AWS tool provides this native integration with SageMaker Pipelines?

- A) AWS Glue DataBrew
- B) Amazon EMR
- C) SageMaker Data Wrangler
- D) AWS Glue Studio
Correct Answer: C

Correct Answer Analysis:
- C is Correct: SageMaker Data Wrangler allows users to interactively build a data preparation "flow." Once the flow is complete, it can be directly exported as a step in an Amazon SageMaker Pipeline, enabling automated, repeatable execution of the exact same transformations during model retraining.

Distractor Analysis:
- A is Incorrect: AWS Glue DataBrew integrates with AWS Glue and Amazon Athena workflows, but it does not have a native, one-click export feature to generate SageMaker Pipeline steps.
- B is Incorrect: Amazon EMR requires manual orchestration (e.g., using Step Functions or custom script in Lambda) to integrate an EMR Spark job into a SageMaker Pipeline.
- D is Incorrect: AWS Glue Studio is used for visual ETL within the Glue ecosystem and does not natively export to SageMaker Pipelines.

> Exam Tip: SageMaker Data Wrangler flows can be exported directly to SageMaker Pipelines for MLOps automation, ensuring training-serving skew is minimized.
### Question 4 - Serverless Scheduled Data Anonymization

A healthcare startup needs to anonymize PII and transform daily batches of patient records stored in an Amazon Redshift database. They require a solution that operates serverlessly, applies a repeatable set of visual transformations, and triggers the transformation automatically on a daily schedule. Which AWS tool meets these requirements with the LEAST operational overhead?

- A) Amazon EMR with a scheduled Apache Spark job
- B) AWS Glue DataBrew with a scheduled recipe job
- C) AWS Lambda with Pandas triggered by Amazon EventBridge
- D) SageMaker Processing with custom Spark code
Correct Answer: B

Correct Answer Analysis:
- B is Correct: AWS Glue DataBrew can connect to Amazon Redshift, apply a visual recipe for anonymization (masking/redaction), and schedule the job to run automatically daily. It is fully serverless and requires no infrastructure management or custom code.

Distractor Analysis:
- A is Incorrect: Amazon EMR requires cluster provisioning and management, which violates the "least operational overhead" and "serverless" constraints.
- C is Incorrect: AWS Lambda is serverless, but using Pandas requires writing custom code, and Lambda has strict execution time and memory limits that are unsuitable for batch database transformations.
- D is Incorrect: SageMaker Processing requires writing custom Spark code and managing the processing container, introducing unnecessary overhead compared to DataBrew's visual recipes.

> Exam Tip: For serverless, scheduled, visual ETL against databases, AWS Glue DataBrew's recipe jobs are the optimal low-code choice.
### Question 5 - Exporting Data Wrangler Flows

A data science team is using SageMaker Data Wrangler to prepare a dataset. They have completed the interactive transformations and need to deploy this transformation logic so it can run on a daily schedule as part of a larger ETL workflow, writing the results back to Amazon S3 in Parquet format. They want to avoid managing servers and custom orchestration scripts.

What is the MOST operationally efficient way to execute the Data Wrangler flow in production?

- A) Export the Data Wrangler flow as a PySpark script and run it on an Amazon EMR serverless application.
- B) Export the Data Wrangler flow to a SageMaker Processing job and orchestrate it using Amazon EventBridge.
- C) Export the Data Wrangler flow as Python code and run it within an AWS Glue ETL job.
- D) Export the Data Wrangler flow to a SageMaker Pipeline step that runs the Data Wrangler job.
Correct Answer: D

Correct Answer Analysis:
- D is Correct: Exporting the Data Wrangler flow directly to a SageMaker Pipeline step natively integrates the transformation process into an automated, serverless MLOps workflow. SageMaker Processing handles the compute under the hood, requiring no server management or custom orchestration code.

Distractor Analysis:
- A is Incorrect: Exporting to EMR Serverless introduces unnecessary operational complexity and is not the native, most efficient path for Data Wrangler flows.
- B is Incorrect: While SageMaker Processing is the underlying compute, Amazon EventBridge cannot natively execute a Data Wrangler flow without an intermediary like Step Functions or SageMaker Pipelines.
- C is Incorrect: Exporting to Python code and running in AWS Glue breaks the native lineage and requires manual maintenance of the extracted code, increasing overhead.

> Exam Tip: To productionize SageMaker Data Wrangler flows, export them directly to SageMaker Pipelines for seamless, serverless automation.
### Question 6 - Large-Scale Stateful Aggregations

An e-commerce company is building a recommendation engine. They have hundreds of millions of user interaction logs in Amazon S3. They need to perform feature engineering, including calculating rolling window aggregates (e.g., user clicks in the last 7 days), which requires stateful processing across records. They want a fully managed, serverless Apache Spark environment to run this ETL job without managing clusters.

Which AWS service should they use to perform this transformation?

- A) AWS Glue DataBrew
- B) Amazon EMR (managed cluster)
- C) AWS Glue ETL
- D) SageMaker Data Wrangler
Correct Answer: C

Correct Answer Analysis:
- C is Correct: AWS Glue ETL provides a fully managed, serverless Apache Spark environment. It is highly scalable and natively supports complex Spark operations, including stateful aggregations like rolling windows, without requiring the user to provision or manage clusters.

Distractor Analysis:
- A is Incorrect: AWS Glue DataBrew is a visual tool designed for common cleaning tasks; it is not suited for complex, stateful Spark aggregations on massive datasets.
- B is Incorrect: Amazon EMR provides managed clusters, but it is not serverless (requires cluster management and scaling configuration), violating the "serverless" constraint.
- D is Incorrect: SageMaker Data Wrangler is designed for interactive data prep on smaller datasets and is not the optimal tool for massive, serverless batch stateful aggregations across hundreds of millions of records.

> Exam Tip: For serverless Apache Spark ETL jobs requiring complex stateful aggregations, AWS Glue ETL is the standard AWS service.
### Question 7 - Interactive Low-Code Prep in SageMaker

A machine learning team wants to perform quick, interactive data preparation on a 2 GB CSV file stored in Amazon S3. They need to visualize data distributions, handle outliers, and transform columns without writing any code. They want to do this entirely within the Amazon SageMaker environment before training a model.

Which AWS tool should they use?

- A) AWS Glue DataBrew
- B) SageMaker Data Wrangler
- C) Amazon EMR
- D) AWS Glue Studio
Correct Answer: B

Correct Answer Analysis:
- B is Correct: SageMaker Data Wrangler is built directly into Amazon SageMaker Studio and Canvas. It provides a visual, low-code interface to import data, generate quick visualizations, handle outliers, and apply transformations, making it the perfect tool for this interactive ML prep task.

Distractor Analysis:
- A is Incorrect: While AWS Glue DataBrew is visual and low-code, it is a standalone service outside of the SageMaker environment and is not used for interactive prep directly within SageMaker Studio.
- C is Incorrect: Amazon EMR requires writing Spark code and managing clusters, which is the opposite of quick, low-code interactive preparation.
- D is Incorrect: AWS Glue Studio is for visual ETL within AWS Glue, not for interactive ML feature engineering inside SageMaker.

> Exam Tip: When the scenario explicitly mentions working "within SageMaker" and requires interactive, low-code visualizations for ML, choose SageMaker Data Wrangler.
### Question 8 - Visual ETL Workflows with Spark

An enterprise needs to transform structured data from an Amazon RDS database, apply complex business rules using Apache Spark, and output the data to Amazon S3 for downstream ML training. The data engineers prefer a visual, drag-and-drop interface to build the ETL workflow that generates the underlying Spark code, reducing the need to write PySpark from scratch.

Which AWS tool provides this visual interface for creating ETL workflows that run on Apache Spark?

- A) Amazon EMR
- B) AWS Glue Studio
- C) SageMaker Data Wrangler
- D) Amazon Athena
Correct Answer: B

Correct Answer Analysis:
- B is Correct: AWS Glue Studio provides a visual drag-and-drop interface to create ETL workflows. It automatically generates the underlying Apache Spark code based on the visual transformations, allowing engineers to visually build complex Spark ETL jobs.

Distractor Analysis:
- A is Incorrect: Amazon EMR provides the Spark infrastructure but does not include a visual drag-and-drop interface for building the ETL logic.
- C is Incorrect: SageMaker Data Wrangler is for interactive ML feature engineering, not for building broad, complex ETL workflows from RDS to S3 using visual Spark DAGs.
- D is Incorrect: Amazon Athena is a query service and does not provide a visual interface to build and orchestrate complex Spark ETL workflows.

> Exam Tip: AWS Glue Studio is the visual interface for AWS Glue ETL, allowing users to drag and drop data sources, transforms, and targets to generate Spark code.
### Question 9 - Stateless Per-Record Stream Processing

A company is processing a streaming IoT data feed to detect anomalies. They need to transform the incoming data stream by parsing JSON payloads and filtering records based on a simple temperature threshold before sending the valid records to Amazon Kinesis Data Firehose. The transformation requires per-record processing with no need to maintain state across records or sliding windows. The solution must be highly serverless and event-driven.

Which AWS tool is the MOST appropriate for this transformation?

- A) AWS Glue Streaming ETL
- B) AWS Lambda
- C) Amazon EMR
- D) AWS Glue DataBrew
Correct Answer: B

Correct Answer Analysis:
- B is Correct: AWS Lambda is ideal for event-driven, per-record stream processing. Since the transformation (parsing JSON and filtering based on a threshold) is stateless and does not require aggregations across multiple records or sliding windows, Lambda is the most lightweight and serverless option.

Distractor Analysis:
- A is Incorrect: AWS Glue Streaming ETL runs Apache Spark Structured Streaming, which is overkill for simple, stateless per-record filtering and introduces unnecessary operational overhead and cost.
- C is Incorrect: Amazon EMR requires cluster management and is designed for heavy batch or complex stateful stream processing, not simple per-record filtering.
- D is Incorrect: AWS Glue DataBrew is designed for batch data preparation, not real-time stream processing.

> Exam Tip: For stateless, per-record stream transformations, AWS Lambda is the most efficient tool. Use Spark (via Glue Streaming or EMR) only when stateful windowed aggregations are required.
### Question 10 - Deep Infrastructure Control for MLlib

A data engineering team needs to process petabytes of climate data using specialized Apache Spark machine learning libraries (Spark MLlib) that require custom cluster tuning and specific hardware configurations (e.g., GPU instances). The team must have full control over the cluster OS and environment to install custom system-level dependencies and C++ libraries that the Spark MLlib algorithms depend on.

Which AWS tool provides this level of control?

- A) AWS Glue ETL
- B) Amazon EMR
- C) AWS Glue DataBrew
- D) SageMaker Data Wrangler
Correct Answer: B

Correct Answer Analysis:
- B is Correct: Amazon EMR provides managed clusters where the user retains full control over the underlying EC2 instances, OS, and environment. This allows the installation of custom system-level dependencies, C++ libraries, and the use of specialized hardware like GPUs.

Distractor Analysis:
- A is Incorrect: AWS Glue ETL is a serverless, managed environment that abstracts away the infrastructure. Users cannot log into the cluster OS to install custom system-level dependencies or choose specific EC2 instance types for GPU tuning.
- C is Incorrect: AWS Glue DataBrew is a visual tool with no access to underlying infrastructure or custom library installation.
- D is Incorrect: SageMaker Data Wrangler is an interactive, low-code tool that does not allow deep system-level OS modifications or custom C++ library installations for Spark MLlib.

> Exam Tip: When a scenario requires custom OS-level dependencies, system libraries, or specialized hardware control for Spark jobs, Amazon EMR is the correct choice over serverless options.