The connection has timed out on EC2 instance

0

Hello everyone, I completed the half part of the lab called Building Your First Amazon Virtual Private Cloud (VPC). When I type the public IPv54 address of the EC2 to the web browser I get this message.

`The connection has timed out

An error occurred during a connection to <my_ip_goes_here>.

The site could be temporarily unavailable or too busy. Try again in a few moments.
If you are unable to load any pages, check your computer’s network connection.
If your computer or network is protected by a firewall or proxy, make sure that Firefox Developer Edition is permitted to access the web.`

The set up is correct. Well, I think. The security group uses an HTTP protocol. An IGW is attached to the VPC, as well as a route table is associated with a public subnet.

Thanks, Theodosios

2 Answers
0

Hello.

Is it possible to connect to EC2 using SSH etc?
Make sure your web server is up and running by connecting to EC2 if possible.

sudo systemctl status httpd

If the web server is not started, start it using the command below.
If the web server is not installed, please install it using the "yum" command or the OS package manager command.

sudo systemctl start httpd
sudo systemctl enable httpd

To SSH to EC2, you need to allow SSH in the inbound rules of the EC2 security group.
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-connect-methods.html

profile picture
EXPERT
answered 2 months ago
profile picture
EXPERT
reviewed a month ago
0

There are only few things that can go wrong in VPC side for this setup.

Check this,

1- EC2 has public ip?

2- Subnet in which EC2 is launched has default route 0.0.0.0/0 to IGW?

3- Inbound security group attached to EC2 has both http port 80 and https port 443 open from source 0.0.0.0/0 ?

4- Outbound security group attached to EC2 has all traffic allowed

What is public IP ?

answered 2 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