A company wants to monitor the number of failed SSH login attempts on a fleet of EC2 instances. Which approach provides near real-time alerts?

Answer

Install and configure Amazon CloudWatch Logs agent to send logs to CloudWatch Logs, then create a metric filter and alarm.

Explanation

CloudWatch Logs agent collects system logs, and metric filters can extract patterns like failed logins to trigger alarms. CloudTrail records API activity, not OS-level login attempts.

Last reviewed: October 2026

Reviewed by FirstInTest Editorial Team

Report an error
QuestionBack to list