error checking on ec2 input