By using AWS re:Post, you agree to the Terms of Use
/cannnot connect to my EC2 instance/

cannnot connect to my EC2 instance

0

I have created an EC2 instanced in US-west-2 (Oregon). It has passed both the checks. Have checked all the steps necessary for connecting my EC2 instance as well as to internet, but couldn't connect. The mandatory Instance Status Checks, both has passed. IAM Role: AmazonEC2FullAccess. OS as Ubunut 20.04.

The 'Get instance screenshot' shows console with Ubuntu 22.04 LTS ip-172.31.xx.xx (my private IP) tty 1 ip-172.31.xx.xx login: _

One VPC, under that have created a subnet. Have an Internet Gateway, which is attached to the VPC. Have only one Security Group (default) with VPC ID as the one I have (VPC). Inbound rule for the Security Gr is Type: All TCP, Protocol: TCP, Port Range: 0 to 65535, Source: Custom 0.0.0.0/0 For type SSH, Protocol: TCP, Port Range: 22, Source: same as above. HTTP with port :80 and all other are same. For HPPTS only port is 443 all other are same. Have one Route table, attached VPC. Explicit Association with Subnet linked to the EC2 instance.

What else should I need to check?

BTW, previously I have created a personal account with gmail address. After some initial struggle could connect to my instance and then to internet, install web server (apache etc.) . But with the same setting could not connect this instance. I cannot start my project. Would be of great help if anyone could help.

Thanks. Deb

3 Answers
0

Have you checked your Netwrok ACLs? Also what routes do you have in your route table? How are you attempting to connect?

answered a month ago
0

Thanks for replying. Here is the the information.

Network ACL

Inbound rule: Rule number : 100, Type: All traffic, Protocol: All, Port range: All, Source: 0.0.0.0/0, Allow

Rule number : * , all other are same except the last one which is 'Deny' .

It is same for Outbound rules

VPC: CIDR: 172.31.32.0/16

Subnet CIDR: 172.31.32.0/20

EC2 instance pvt add: 172.31.44.x

Route table (Routes)

Destination Target Status Propagated

172.31.0.0/16 local Active No

0.0.0.0/0 igw-0429a21c03a6b31a6 Active No

I am trying to connect by 'Instance Connect' (browser console).

answered a month ago
0

Not sure how it worked, but it did. Only change I have made is the create IAM role with Policy name as 'AmazonEC2FullAccess'. Even after that I couldn't connect. But after an hour or so I could. Is there any time lag between actual setting and when it actually start acting?

Thanks. Deb

answered a month 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