Timed out when trying to access the public IP of my EC2 instance in a browser

0

Hello everyone,

as a complete beginner in AWS, I'm following a coursera course for AWS beginners. One of the first exercises is to create a EC2 instance via the AWS console. They provide us with a little script that boots up on an app on the virtual machine, and should then be accessible with an HTTP call on the public IP. I don't what's exactly going on but it seems that the page is loading forever and then times out when I try to access it on a web browser at the address http://<public-ip-address>

Does anyone know what could be going on ? Here are the details of the EC2 instance I've launched :

Amazon Linux AMI t2.micro HTTP protocol (source: everywhere) I've configured a key pair default VPC chose first subnet

subnet

subnetmapping

I also have an error when trying to use EC2 Instance Connect. (maybe because I have only configured HTTP and not SSH)

Failed to connect to your instance
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 Set up EC2 Instance Connect at https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-connect-set-up.html.

If anyone could help me debug this, that would be really helpful. Thank you for reading me !

1 Answer
1

Make sure you launched the instance in a public subnet. If you did not, you will need to deploy another instance in the public subnet.

profile pictureAWS
EXPERT
kentrad
answered a year ago
  • Thank you for your answer ! I've added the details of the VPC and subnet as a screenshot in my question. I'm not sure if it's public or not actually.

  • OK. Go to VPC Dashboard and click on Subnets and find that subnet. Click on the Route Table tab under the details of the subnet and look for a route like, this: Destination 0.0.0.0/0, Target igw-xxxxxxxxxxxx. If you don't see that rule, it is a private subnet. Find a subnet in that VPC that has that rule and deploy to that subnet.

  • I've updated my original post again with another screenshot. It seems that the target seems to be "igw-xxxxxxxxxxxx", but the IP is not 0.0.0.0 if I read correctly.

  • The routing looks correct. Can you now check the security group that is attached to the instance? There should be two rules, one for SSH and one for HTTP.

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