The link below will open a file with instructions on how to configure the router to send MODBUS data to Amazon Web Services MQTT broker:
Basically, it uses the router itself as a MODBUS slave, which can be any MODBUS device, to query data from and master and utilizes Data to server functionality to send it to AWS.
Guide here, shows how to use Azure IoT package, to send some data from the device to Azure IoT HuB. In order to apply it to your application to send MODBUS data, you would need to follow instructions how to setup the device in the Azure webpage, as provided in the wiki example. The difference is in how the device should be configured. As with the AWS example, you would need to configure MODBUS slave and master with requests from slave. Next you would need to use Data to server application with protocol set as Azure MQTT. Another important option is URL / Host / Connection string, where you would need to paste Primary connection string from the device, created in Azure.
Example of Data to server configuration for Azure data to server is provided below: