In the new preview version of the IoT Edge gateways one module can invoke methods on another via InvokeDeviceMethodAsync. This takes a device id and a module id as parameters, presumably to tell Edge how to route the call. When calling within the same gateway, the device id parameter should be the device id of the gateway instance in IoT Edge hub. The module id should be the module id of the instance of the module pushed down to the gateway from IoT edge. It is easy to hard code those id's but would obviously not be desirable. You could place the hard coded values in config files that get read by the modules on load which would be less problematic but still not ideal. Is there a way to pro grammatically discover/populate the needed values? Do the deployment json configs support variable substitution or similar upon deployment to populate instance ids?