raise expetion if can not connect to EC2