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.

gefragt vor 2 Monaten118 Aufrufe
1 Antwort
1
Akzeptierte Antwort

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.

beantwortet vor 2 Monaten
profile picture
EXPERTE
überprüft vor 2 Monaten
  • 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 :)

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen