Better way to receive VM ID for EC2 driver

Not only dns name is checking but also IP address 169.254.169.254