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

질문됨 2년 전289회 조회
3개 답변
0

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

전문가
답변함 2년 전
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).

답변함 2년 전
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

답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠