AWS Certified Developer – Associate / Question #804 of 557

Question #804

A company runs a data analysis application on an Amazon EC2 instance. Each data batch must be processed within 3 minutes. If processing exceeds this time, the operations team must receive an alert.

How can a developer implement the required time measurement and alerting with the LEAST operational overhead?

A

Create an Amazon CloudWatch custom metric. Each time a batch is processed, publish the processing time as a metric value. Create a CloudWatch alarm based on a static threshold of 3 minutes. Notify the operations team by using an Amazon Simple Notification Service (Amazon SNS) topic.

B

Create an Amazon Simple Queue Service (Amazon SQS) queue. Each time a batch is processed, publish the processing time to the queue. Develop an application to consume messages from the queue and check for values exceeding 3 minutes. Notify the operations team by using an Amazon Simple Notification Service (Amazon SNS) topic.

C

Create an Amazon CloudWatch custom metric. Each time a batch is processed, publish the processing time as a metric value. Create a CloudWatch alarm that triggers if the average processing time exceeds 3 minutes. Notify the operations team by sending an Amazon Simple Email Service (Amazon SES) message.

D

Create an Amazon Kinesis data stream. Each time a batch is processed, publish the processing time to the stream. Configure a CloudWatch alarm to trigger if any value exceeds 3 minutes. Notify the operations team by using an Amazon Simple Notification Service (Amazon SNS) topic.

Explanation

Answer A is correct because:
- CloudWatch Custom Metrics allow the application to publish the processing time of each batch directly, enabling precise tracking.
- Static Threshold Alarm ensures an alert is triggered immediately if any single batch exceeds 3 minutes, meeting the requirement.
- SNS Integration provides a simple, managed way to notify the operations team without additional infrastructure.

Other options are incorrect because:
- Option B requires building and maintaining a custom SQS consumer application, increasing operational overhead.
- Option C uses an average-based alarm (not per-batch) and SES (less flexible than SNS), failing to meet the requirement.
- Option D involves Kinesis, which requires additional processing to feed data into CloudWatch, adding complexity.

Key Points: Use CloudWatch for metrics/alarms and SNS for notifications to minimize operational effort. Ensure alarms trigger on per-batch thresholds, not averages.

Answer

The correct answer is: A