DVA-C02 · Question #262
A company deploys a photo-processing application to an Amazon EC2 instance. The application needs to process each photo in less than 5 seconds. If processing takes longer than 5 seconds, the…
The correct answer is A. Create an Amazon CloudWatch custom metric. Each time a photo is processed, publish the. Publishing a custom CloudWatch metric for processing time and creating an alarm with an SNS notification is the most operationally efficient way to measure latency and alert the team.
Question
A company deploys a photo-processing application to an Amazon EC2 instance. The application needs to process each photo in less than 5 seconds. If processing takes longer than 5 seconds, the company's development team must receive a notification. How can a developer implement the required time measurement and notification with the LEAST operational overhead?
Options
- ACreate an Amazon CloudWatch custom metric. Each time a photo is processed, publish the
- BCreate an Amazon Simple Queue Service (Amazon SQS) queue. Each time a photo is
- CCreate an Amazon CloudWatch custom metric. Each time a photo is processed, publish the
- DCreate an Amazon Kinesis data stream. Each time a photo is processed, publish the processing
How the community answered
(22 responses)- A77% (17)
- B14% (3)
- C5% (1)
- D5% (1)
Why each option
Publishing a custom CloudWatch metric for processing time and creating an alarm with an SNS notification is the most operationally efficient way to measure latency and alert the team.
The application publishes a custom CloudWatch metric (e.g., ProcessingTime in seconds) via the PutMetricData API each time a photo is processed. A CloudWatch alarm is then configured to trigger when the metric exceeds 5 seconds, sending a notification to an SNS topic that emails the development team, requiring no additional infrastructure.
Using SQS to store processing times and a Lambda to evaluate them and send SNS notifications adds unnecessary components and increases operational complexity compared to native CloudWatch metrics and alarms.
This option is a distractor variant of A; the correct answer A already includes both the metric publication and an SNS alarm notification, making C redundant or incorrectly described.
Kinesis Data Streams is designed for high-throughput real-time data streaming, not for simple threshold-based alerting. Using Kinesis for this use case introduces unnecessary cost and operational overhead.
Concept tested: CloudWatch custom metrics and alarms for application performance monitoring
Source: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/publishingMetrics.html
Community Discussion
No community discussion yet for this question.