- Newest
- Most votes
- Most comments
Hello, following are some of the chances to ec2 instance connection failure.
Ensure your instance is in a public subnet with an internet gateway attached for outbound traffic and update your security group to allow inbound communication from EC2 Instance Connect IP addresses like '13.233.177.0/29'. Additionally, confirm instance status, verify IAM permissions, and check for any region-specific maintenance on the AWS Service Health Dashboard.
1.Public Subnet and Internet Gateway: Ensure your instance is in a public subnet with an internet gateway attached to allow outbound traffic required for Instance Connect.
2.EC2 Instance Connect IP Addresses: Authorize port 22 for the EC2 Instance Connect service IP addresses (e.g., 13.233.177.0/29) in your security group.
3.Instance State: Confirm that your instance is running and reachable for Instance Connect to function properly.
4.IAM Permissions: Verify that the IAM user or role you're using has the necessary permissions for Instance Connect.
5.Region Maintenance: Check the AWS Service Health Dashboard for any ongoing maintenance or disruptions in your region.
Hello.
There is a problem with the rules set in the security group.
Please add a rule with "13.233.177.0/29" set as the inbound rule source.
The rules you are currently using only allow communication from ENIs that have specific security groups configured.
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/working-with-security-groups.html#updating-security-group-rules
Here's how you can authorize port 22 for EC2 Instance Connect:
Go to the EC2 dashboard in the AWS Management Console.
Select the EC2 instance for which you want to enable Instance Connect.
Click on the "Security" tab in the instance details pane.
Find the security group associated with your instance.
Click on the linked security group 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.
Hi
Here are the IP ranges needs to open the SG https://ip-ranges.amazonaws.com/ip-ranges.json you can find the region , Look at the link for more information https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-connect-tutorial.html#eic-tut1-task2
Relevant content
- Accepted Answerasked 5 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago