Course menuMLA-C02

Exams / MLA-C02 / Streaming data for ML / Question 2

MLA-C02 practice question: Streaming data for ML (2 of 2)

Data Preparation for ML and AI A free question from our original MLA-C02 practice exam. Try it, then open the answer to see why each option is right or wrong.

Last verified against current AWS documentation ·How we write our questions

A logistics broker runs its shipment-tracking system on Apache Kafka in an on-premises data center. Its ML team wants to stream these events into AWS for model training, and the operations team wants to keep the existing Kafka producers and their client libraries unchanged.

The stream must be durable, must support replay of old events for retraining, and must be managed by AWS with no Kafka brokers to patch.

Which solution meets these requirements?

Choose one answer.

  1. A. Rewrite each producer to send records to Amazon Kinesis Data Streams with the Kinesis Producer Library, and read the stream with AWS Lambda.
  2. B. Send the events to an Amazon SQS FIFO queue and have a Lambda function write each message to Amazon S3.
  3. C. Run a Kafka cluster on Amazon EC2 instances that the team builds from open-source packages and manages itself.
  4. D. Create an Amazon Managed Streaming for Apache Kafka cluster, point the existing producers at its brokers, and use an MSK Connect sink connector to deliver events to Amazon S3.
Show the answer and explanation

Answer: D

  • A. Wrong: Kinesis Data Streams is durable and supports replay within its retention period, but every producer would need code changes to use the Kinesis API. The operations team requires the existing Kafka producers and client libraries to stay unchanged. Learn more: What is Amazon Kinesis Data Streams? (opens in a new tab)
  • B. Wrong: SQS uses its own API rather than the Kafka protocol, so the producers would still change. Messages are removed after they are consumed, which makes replay for retraining difficult.
  • C. Wrong: This keeps the Kafka protocol, but the team would patch, scale and secure the brokers, which the requirement rules out. Managed Kafka on AWS gives the same protocol without that work.
  • D. Right: Correct. Amazon MSK runs Apache Kafka, so producers keep their clients and protocol and only change the broker addresses. Topics keep events for the configured retention period, which allows replay for retraining. Learn more: What is Amazon Managed Streaming for Apache Kafka? (opens in a new tab)

Explanation

Amazon MSK provides managed Apache Kafka, so existing producers and client libraries keep working and only change their broker endpoints. Topic retention lets the ML team replay old events. Kinesis and SQS require producer changes, and self-managed Kafka on EC2 leaves the broker operations with the team.

Study

Keep practicing

Answer questions with a score at the end, or practice just this topic with the explanation after each one. No sign-up needed.

Want more on Streaming data for ML? The 5 full-length practice sets have 10 more Streaming data for ML questions, 325 in all, none of them in the free exam. One payment of $14.99, no subscription. See the practice sets