Lately I encountered a weird issue where one of my newly launched EC2 instance was not showing any other option than RDP to connect to. After spending some time in checking security groups and other network related settings I decided to check the SSM diagnostic logs. But before I share how I managed to find the problem, let me first share with you all the possible symptoms of SSM related issues.
Possible SSM related issues:
- Connection through Session Manager unavailable
- Connection through Fleet Manager unavailable
- Status of EC2 instance showing as ‘Connection lost’ under Managed nodes.
- Can’t use run command
If you happen to encounter any of the above issues then look into the SSM diagnstic logs for possible issues.
To, check the AWS SSM diagnostic logs follow the below steps:
On Windows machines:
- Open Pwershell and go to C:\Program Files\Amazon\SSM directory
- Now, run the below command
.\ssm-cli.exe get-diagnostics --output table
This command should show a table similar to the below one.
![](https://devopshorizon.com/wp-content/uploads/2024/03/SSM-1024x550.png)
Now, in this table look for any ‘failed’ status and then take necessary actions to fix the problem.
For Linux and macOS:
- Run the below command and it should also return a similar table as mentioned above.
ssm-cli get-diagnostics --output table
My Issue and and it’s resolution– In my case the issue was with DNS settings on the EC2 instance, once I fixed that the EC2 machine became available in System Manager.