A regional bank runs a nightly reconciliation batch job on EC2. The job publishes a custom metric named ReconciledAccounts once when it completes, and the bank expects it to finish every night before 6 a.m.
If the job fails or never starts, the metric is not published at all. The operations team wants an alarm that goes to ALARM when no successful completion appears in a 24-hour period, and does not stay in an OK state simply because no data arrived.
The team wants to keep the alarm simple and avoid any extra monitoring code.
Which alarm configuration meets these requirements?
Choose one answer.
AA. Set the alarm's Treat missing data setting to ignore, with a 24-hour period and a threshold of zero, so that the alarm checks only the periods in which the job publishes.
BB. Replace the custom metric with a Logs Insights query that counts completion lines, and run that query from a scheduled rule every 24 hours to send an alert when the count is zero.
CC. Create an anomaly detection alarm on the ReconciledAccounts metric with a band of two standard deviations, and let the band learn the normal daily pattern.
DD. Use the SampleCount statistic over 24 hours with LessThanThreshold and a threshold of 1, and set Treat missing data to breaching.
D. Right: Correct. Treating missing data as breaching turns a period with no published completion into an ALARM state, which is the outcome the bank wants. A SampleCount below 1 over 24 hours also catches a period with no datapoints, whatever value the job reports. Learn more: Configuring how CloudWatch alarms treat missing data (opens in a new tab)
Explanation
Treating missing data as breaching turns a period without any published metric into an ALARM state, so an unfinished or never-started batch job is reported. A 24-hour SampleCount with a LessThanThreshold operator and a threshold of 1 fits a metric published once per night. Ignored missing data, scheduled queries and anomaly detection each miss the case where the metric is absent.
Want more on Custom metrics, metric filters and alarms? The 5 full-length practice sets have 14 more Custom metrics, metric filters and alarms questions, 375 in all, none of them in the free exam. One payment of $14.99, no subscription. See the practice sets →