Go to AWS dashboard -> EC2 -> Instances and make sure that the Public IP address of the instance you wish to connect did not change from the previous setting. The public IP address changes every time you restart the instance.
If you are still not able to connect or if you were never able to connect, change the security group as following:
Go to AWS dashboard -> EC2 -> Instances and find the Security Groups column of the instance you are having trouble connecting and click on the name of the security group This will bring you to another page with the name of the security group you clicked listed. Right click on the row and click on Edit inbound rules Make sure you have the following included in the inbound rules:
Type: SSH, Protocol: TCP, Port Range: 22, Source: MyIP