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 个月前118 查看次数
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 :)

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则