Real-time alerts with Azure functions
Azure functions are small running pieces of code, or functions, in the cloud. You can write small pieces of code that you need for a specific problem without worrying about the complete application or the infrastructure where we can run it.
There are various existing connectivity options available along with language support.
We will be exposing communication with IoT Hub and exploring how Azure functions can work with our small piece of code.
How to do it...
We will create a Azure function and see how to access IoT Hub real time:
- We will continue to use the IoT Hub
IoTHubCookBook
we created earlier. - Select the Azure function app from new – compute:

- Create a new function app,
FNCookBook
:

- Navigate to the function list view, and click the + icon to add a new function.
- Azure function provides multiple templates; we will be selecting the language as C# and the scenario as Data Processing:

- As shown in the following image, input the function name, and select the IoT...