Q45 — AWS DOP-C02 Ch.2
Question 45 of 100 | ← Chapter 2
A DevOps engineer manages a legacy web application running on Amazon EC2. The application uses Amazon Kinesis Data Streams to ingest and process web logs. The DevOps engineer also manages a Kinesis consumer application running on Amazon EC2. A sudden surge in data volume causes the Kinesis consumer application to fall behind, and Kinesis data is discarded before it can be processed. The DevOps engineer wants to implement a solution to scale processing capacity. Which solution meets these requirements with the highest operational efficiency?
- A. Modify the Kinesis consumer application to persist logs in Amazon S3. Use Amazon EMR to process the data directly in Amazon S3 for customer insights. Store results in Amazon S3.
- B. Horizontally scale the Kinesis consumer application by adding more EC2 instances based on the Amazon CloudWatch GetRecords.IteratorAgeMilliseconds metric. Increase the retention period of the Kinesis Data Stream. ✓
- C. Refactor the Kinesis consumer application to run as an AWS Lambda function. Configure the Kinesis Data Stream as an event source for the Lambda function to process the data stream.
- D. Increase the number of shards in the Kinesis Data Stream to improve overall throughput so the consumer application can process data faster.
Correct Answer: B. Horizontally scale the Kinesis consumer application by adding more EC2 instances based on the Amazon CloudWatch GetRecords.IteratorAgeMilliseconds metric. Increase the retention period of the Kinesis Data Stream.
Explanation
Option B is correct. When a sudden data surge causes the Kinesis consumer application to lag and records are dropped, horizontally scaling the application by adding more EC2 instances—triggered by the CloudWatch GetRecords.IteratorAgeMilliseconds metric—increases processing capacity. Increasing the Kinesis Data Stream retention period prevents premature data expiration. Option A introduces complexity and cost via S3 persistence and EMR; efficiency is not guaranteed. Option C may face Lambda resource limits and cold-start latency. Option D increases shard count but does not directly address the consumer’s processing bottleneck. Thus, B delivers the highest operational efficiency.