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.

demandé il y a 2 mois117 vues
1 réponse
1
Réponse acceptée

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.

répondu il y a 2 mois
profile picture
EXPERT
vérifié il y a 2 mois
  • 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 :)

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions