I kept forgetting about the AWS CLI which is quite handy to quickly check if SSM is working on an EC2 instance.

So here it is again for my future-self. Use get-connection-status to return the connection status of the specified managed instance.

$ aws ssm get-connection-status --target i-092af3b3c1234567

{
  "Status": "connected",
  "Target": "i-092af3b3c1234567"
}

Reference: