use ec2 public hostname and ip if available