http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-dns.html explains how dns hostnames in VPC's work