A DevOps engineer receives an alert that an EC2 instance's CPU utilization has been above 90% for the last 30 minutes. The engineer needs to investigate the root cause. Which AWS service should the engineer use to get OS-level process details and identify which process is consuming the CPU?
AWS Systems Manager Run Command is part of AWS Systems Manager and lets you remotely and securely execute shell commands or PowerShell scripts on EC2 instances (and on-premises machines) via the SSM Agent. You can run a command like `ps aux` or `Get-Process` to enumerate running processes, capture output, and store it in S3 or CloudWatch Logs. Because the SSM Agent runs inside the instance as a guest process, it has direct access to OS-level state, making it the appropriate service for collecting process-level data. It also supports rate control and error handling for fleet-wide execution.
Why this answer
AWS Systems Manager Run Command allows you to run commands (e.g., 'top', 'ps') remotely on EC2 instances to obtain OS-level process details and identify which process is consuming CPU. Option A is wrong because AWS Config records configuration changes, not OS-level processes. Option B is wrong because AWS CloudTrail logs API calls, not system-level metrics.
Option D is wrong because Amazon CloudWatch provides aggregated CPU utilization metrics but cannot provide process-level details.