I think that's going to be the best way to get the instance ID, otherwise we would need to figure it out from the dns name which we might be able to do but using instance ID is always going to work.