AWS EC2 setup using sometimes internal, sometimes external IP for host candidates