Can’t connect to free ec2 instance

amazon ec2

I created a new ec2 ubuntu instance. I can't connect to the instance, all I get is connection timed out when I try to connect. I can't ping the instance either. If I try to add new security rules in the amazon ec2 dashboard I cannot save them (the save button will not become active).

I may be using an ami that doesn't work with the free instance (from some things I have read that can be a problem) but I can't see how I am suppose to tell if that is the problem or how to find a ami that will work.

Best Answer

The reason you cannot reach the instance is because the Firewall (controlled by the Security Groups) is not open to you. The reason you cannot save is because you need to include an IP address AND a CIDR mask. In plain english, you need to format your rules like this.

  • xx.xx.xx.xx/#

The /# is something in the range /0 to /32. /32 basically says only open to this IP, while something like /24 would say open to this IP, and anything with an IP with the same first 3 groupings. For you, if your IP was 10.11.12.13, in the security group pick your port to open and add

  • 10.11.12.13/32

At the end, then click save. This will open the firewall to just your current IP, and should let you access your instance.