EC2MetadataClient is extraordinarily slow, even on EC2. Lookup the instance id once  (roughly once in the face of concurrency) and cache it.