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.

asked 2 months ago105 views
1 Answer
1
Accepted Answer

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.

answered 2 months ago
profile picture
EXPERT
reviewed a month ago
  • 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 :)

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions