Currently all the deployment metadata prep is done in the REI function, we should extract that so it can be used by itself.