If you're encountering issues with the SSM Agent on your EC2 instance, there are several possible causes. Below are some common troubleshooting steps to help resolve the issue:
Below are some common troubleshooting steps to help resolve the issue:
- Issue: High CPU utilization can cause the instance to become unresponsive to SSM commands.
- Action: Try logging into the instance via SSH. If you're unable to log in, proceed to the next step.
You can check from AWS console: System log IMG
To review system logs for an EC2 instance on the AWS console using "Get System Log", navigate to the EC2 console, select your instance, then under "Actions" choose "Monitor and troubleshoot" and then "Get System Log"
- Issue: A server restart can often resolve temporary issues, such as resource contention or unresponsive services.
- Action: If the server is still unresponsive, try restarting it. (To avoid potential data loss, you can stop and then start the server instead of a direct reboot.)
Issue: The SSM Agent might not be correctly installed or configured. Action: Check if the SSM Agent is installed and running on your server.
- For detailed instructions on how to install the SSM Agent on EC2 Instance, refer to this link: https://docs.aws.amazon.com/systems-manager/latest/userguide/manually-install-ssm-agent-linux.html
- Issue: The EC2 instance might not have the correct IAM role attached, preventing it from communicating with SSM.
- Action: Verify that the correct IAM role is attached to the EC2 instance and that it has the necessary permissions. For more details on setting up IAM roles for EC2 instances, check this guide, https://docs.aws.amazon.com/systems-manager/latest/userguide/setup-instance-permissions.html
Note: IAM role configuration should be proper to connect throuhgh SSM from EC2 Instance.
Official Documentation: For more detailed troubleshooting, refer to the official AWS SSM Agent troubleshooting guide