- Newest
- Most votes
- Most comments
This error is common when trying to connect to an EC2 instance using EC2 Instance Connect. There are several potential causes and solutions to address this issue:
-
Security Group Configuration: The most likely cause is that your instance's security group does not allow inbound SSH traffic (port 22) from the EC2 Instance Connect IP range for your specific region. You need to update your security group's inbound rules to allow SSH traffic (TCP port 22) from the EC2 Instance Connect IP range for your region. In your case, you need to add an inbound rule allowing access from 13.233.177.0/29.
-
Network Settings: Ensure that your instance is in a public subnet with an internet gateway attached, allowing for outbound traffic necessary for Instance Connect to function.
-
Instance State: Verify that your EC2 instance is in the "running" state and not in a transitional state.
-
IAM Permissions: Check that the IAM user or role you're using has the necessary permissions to use EC2 Instance Connect.
-
EC2 Instance Connect Package: Make sure the EC2 Instance Connect package is installed on your instance if you're using a supported Linux distribution.
To resolve the issue:
- Go to the EC2 dashboard in the AWS Management Console.
- Select your EC2 instance.
- Click on the "Security" tab in the instance details pane.
- Find the associated security group and click on it to edit its rules.
- Add a new inbound rule for SSH (port 22) with the source set to 13.233.177.0/29.
- Save the changes to the security group.
If you've verified all these settings and still can't connect, try rebooting your instance. If the problem persists, consider using alternative connection methods like AWS Systems Manager Session Manager, or reach out to AWS support for more in-depth troubleshooting assistance.
Sources
EC2 instance failed to connet | AWS re:Post
EC2 Instance Connect Fails to Connect - Network Configuration Issues or Misconfiguration? | AWS re:Post
Troubleshoot connection with EC2 Instance Connect | AWS re:Post
Why unable to connect with Instance Connect despite all inbound and outbound ports open | AWS re:Post
Hello.
In addition to the AWS re:Post Agent answer, looking at the image you shared, one EC2 status check is failing.
This may be due to a problem with the OS inside the EC2 instance, which is causing the connection to fail.
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/monitoring-system-instance-status-check.html
The solution will vary depending on the cause, but first try starting and stopping the EC2 instance.
https://repost.aws/knowledge-center/ec2-linux-status-check-failure
Relevant content
- asked 2 years ago
- AWS OFFICIALUpdated 3 months ago
