EC2 Instance Connect is unable to connect to your instance
2024-12-11
You are viewing the logs of an EC2 instance and see the following error

I started getting a lot of GET /.env requests from the botnet. Fortunately, I had configured my environment variables to not be exposed on GitHub or in the deployment file itself, so no harm was done. However, I got nervous and changed my configuration to allow SSH(22) access only from my IP, and this is what happened.
"Fail to connect your instance. EC2 Instance Connect is unable to connect to your instance. Ensure your instance network settings are configured correctly for EC2 instance Connect."
This error was caused by restricting the security group settings to my IP only, rather than 0.0.0.0/0 (global open), and the solution was pretty simple.
It's easy to fix by simply adding the 13.209.1.56/29 (ap-northeast-2,Seoul) band for SSH(22) in the security group settings.
The bands for the region you will be using are
3.112.23.0/29(ap-northeast-1, 도쿄)
13.209.1.56/29(ap-northeast-2, 서울)
15.168.105.160/29(ap-northeast-3, 오사카)
Comments 3
Login required to write comments
Google
Naver