AWS Certified SysOps Administrator – AssociateMonitoring, Logging, and RemediationMedium

A SysOps administrator needs to perform a diagnostic check on an Amazon EC2 instance that is experiencing high CPU utilization but is not responding to SSH connections. The administrator needs to retrieve system logs and run a custom script to analyze processes without direct interactive access. Which AWS service can be used to achieve this?

  1. ADetach the EC2 instance's root volume and attach it to another healthy instance for analysis.
  2. BReboot the EC2 instance and inspect the instance console output for errors.
  3. CUse AWS CloudShell to connect to the instance and execute commands.
  4. DUtilize AWS Systems Manager Run Command to execute a pre-defined script or command on the instance.
Show answer & explanation

Correct answer: D. Utilize AWS Systems Manager Run Command to execute a pre-defined script or command on the instance.

AWS Systems Manager Run Command allows administrators to remotely and securely execute commands and scripts on EC2 instances, even if SSH is unresponsive or unavailable, as long as the SSM agent is running and configured correctly. This is ideal for diagnostic checks like retrieving logs or running scripts.

Why the other options are wrong

  • A. Detaching and reattaching volumes is a valid recovery step but is more disruptive and time-consuming than running a diagnostic command remotely.
  • B. Rebooting might resolve the issue but does not provide diagnostic information about the cause of the high CPU or unresponsiveness.
  • C. CloudShell provides a shell environment but still relies on network connectivity (like SSH) to the instance, which is stated as unresponsive.

Systems Manager Run Command

AWS Systems Manager Run Command enables you to remotely and securely manage the configuration of your EC2 instances and on-premises servers, allowing you to execute commands, scripts, or automation documents.

  • Executes commands on instances without SSH/RDP access.
  • Requires the SSM agent to be installed and running.
  • Supports pre-defined AWS-provided documents and custom scripts.
  • Provides output of command execution for auditing and troubleshooting.

Memory trick: Run Command, the instance's helping hand.

More Monitoring, Logging, and Remediation questions