A payments function normally finishes in about 200 ms, but a few requests take far longer. Which CloudWatch statistic reveals the slowest execution in each period?
Show answer and explanation
Answer: B
The Maximum statistic returns the highest data point in each period, so it exposes the slowest execution. Average blends the slow requests into a typical-looking number. Sum totals all durations, and SampleCount counts how many invocations were recorded. For spotting the single worst case, only Maximum shows it directly.
Why the other options are wrong
- A. Average divides the total by the count, so a few very slow executions get diluted into a number that looks normal. It hides the outliers the team is looking for.
- C. Sum adds up all the durations in the period. That gives total time spent, not the duration of the slowest single execution.
- D. SampleCount reports how many data points were recorded. It tells you how many invocations occurred, not how long the slowest one took.