I have my website running on a t2.2xlarge instance (no ELB in between). I am able to SSH to this instance 99% of the time using the key mechanism.
However, when the website is down, sometimes I am not able to SSH to this instance as all though instance state is RUNNING. Timeout error is returned in those 1% cases.
There is no change between the ways when I am able to connect to the instance and when I am not.
Connection method "EC2 Instance Connect (browser-based SSH connection)" mentioned on AWS EC2 home page also never helped:
Gone through all the posts and below link but no luck since SSH worked 99% of the time:
Troubleshooting Connecting to Your Instance
Best part is "System Status Checks" mentioned on the EC2 home page also show - System reachability check passed. This time I submitted feedback to them regarding this issue but yet to get revert.
I typically wait for few minutes and then restart the instance. This is the worst option but I could not find any alternative.
Please suggest how to find root cause and fix this issue.