Detection

Application JSON logs already retained in CloudWatch Logs contain userId and authenticationResult fields. An analyst needs the users with the most failed authentications during the previous six hours, without deploying additional components. What should the analyst use?

Show the answer

Correct answerC. A CloudWatch Logs Insights query that groups failures by userId

AWhy not this: Athena can query a log group only after its CloudWatch Logs connector is deployed, which the requirement rules out.

BWhy not this: A newly created metric filter does not process the previously retained events needed for this investigation.

CWhy this is right: Logs Insights supports filtering stored JSON events, grouping by a field, and sorting aggregated counts.

DWhy not this: CloudTrail event history contains AWS management events, not arbitrary application authentication records.

CloudWatch Logs Insights can filter retained events, aggregate failure counts by userId, and sort the results with no setup. Athena needs a deployed CloudWatch Logs connector to query a log group, and metric filters process only events ingested after they are created.