Can't connect to my EC2 instance

0

Upon launching it and trying to connect to it, I receive an error:

EC2 Instance Connect is unable to connect to your instance. Ensure your instance network settings are configured correctly for EC2 Instance Connect. For more information, see EC2 Instance Connect Prerequisites at https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-connect-prerequisites.html.

I've gone through the tutorial, tried adding a permission set to a security group, creating a policy and adding it to a user, checked that one of the inbound rules allows to connect to the instance from my IP, nothing worked. Can provide more details if necessary.

已提問 2 個月前檢視次數 117 次
1 個回答
1
已接受的答案

Resolved after I added an IP address of AWS pulled from this JSON file to one of the inbound rules: https://ip-ranges.amazonaws.com/ip-ranges.json (filter on "EC2_INSTANCE_CONNECT" and your region)

for full tutorial: https://docs.aws.amazon.com/vpc/latest/userguide/aws-ip-ranges.html

Sadly this didn't seem to be in the overall tutorial on EC2.

已回答 2 個月前
profile picture
專家
已審閱 2 個月前
  • I did this and it worked but I'm confused. If an "all tcp" rule has 0.0.0.0/0 vs. the ca-central-1 ip, would 'all' work and negate having to spend the effort to have the added ip address? Yes, 0.0.0.0/0 is bad for security, but it should work, no?

  • RickSegal not sure, I have just started with AWS about 1.5 months ago :)

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南