EC2 Instances not reachable from Internet

0

When I create EC2 instances they are not accessible from the internet. This happens with the default VPC and a custom VPC I created. I have an internet gateway in the VPCs this has been tried in. I get a public IP address assigned to the instance. The route table and the security policy allow all traffic and the gateway is mapped in the route table as well. These are common instances such as the amazon linux and ubuntu instances.

I thought maybe my VPC was the issue, but the Default VPC should work by default, is that a correct assumption?

asked 8 months ago235 views
3 Answers
0
Accepted Answer

The Default VPC Security group only allows access from its self. You will need to update the appriopiate security group to allow inbound traffic to the port in question from the CIDR you require.

If you could share more details about your security groups etc, this would help

Thanks

profile picture
EXPERT
answered 8 months ago
profile picture
EXPERT
reviewed 8 months ago
  • That was what confused me. I thought that the default security policy already allowed traffic in. Everyone shows EC2 instance creation, but it wasn't clear to me how that Security Group worked. That was definitely my issue. Thank you for the help.

0

Please use the VPC Reachability Analyzer to troubleshoot this issue.

profile pictureAWS
EXPERT
kentrad
answered 8 months ago
  • For some reason we can't seem to get that working. It gives me an access denied.

0

Default VPC sg is Literally Default VPC sg. AWS best practice is make custom sg for each workload environment and required policy. When you make sg with right policy for your situation (for example allow specific source IP/Any IP with specific destination service port to reach your instances)than put this on your instance.

V
answered 8 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