Skip to main content Get to know Azure Microsoft as Customer Zero View all products (200+) Microsoft Foundry Azure Copilot GitHub Copilot Azure Kubernetes Service (AKS) Azure Cosmos DB Azure Database for PostgreSQL Azure Arc Microsoft Fabric Linux virtual machines in Azure Foundry Models Foundry Agent Service Foundry IQ Foundry Tools Foundry Control Plane Observability in Foundry Control Plane Azure OpenAI in Foundry Models Azure Speech in Foundry Tools Azure Machine Learning View all databases Azure Cosmos DB Azure DocumentDB Azure SQL Azure Database for PostgreSQL Azure Managed Redis Microsoft Fabric Azure Databricks Linux virtual machines in Azure Windows Server on Azure Azure Functions Azure Virtual Machine Scale Sets Azure API Management Azure Container Apps Azure Kubernetes Service (AKS) Azure Kubernetes Fleet Manager Azure Container Registry Azure Red Hat OpenShift Azure Container Instances Azure Container Storage Azure Arc Azure Local Microsoft Defender for Cloud Azure Monitor Microsoft Sentinel Azure Migrate View all solutions (40+) Cloud solutions for small and medium businesses Cloud migration and modernization center Data analytics for AI Azure Databases AI apps and agents Microsoft Marketplace Microsoft Sovereign Cloud AI apps and agents Responsible AI with Azure AI Infrastructure Data analytics for AI Machine learning operations (MLOps) Low-code application development on Azure Integration Services Serverless computing DevOps Migration and modernization center .NET apps migration Databases on Azure Linux on Azure Oracle on Azure SAP on the Microsoft Cloud Adaptive cloud High-performance computing (HPC) Infrastructure as a service (IaaS) Resiliency Azure Essentials Frontier Accelerate for Azure FinOps on Azure Microsoft Marketplace Azure pricing overview Create an Azure account Free Azure services Flexible purchase options Pricing calculator FinOps on Azure Maximize ROI from AI Azure savings plans Azure reservations Azure Hybrid Benefit Virtual Machines Azure SQL Microsoft Foundry Microsoft Fabric Azure Kubernetes Service (AKS) Microsoft Defender for Cloud View more Software Development Companies Microsoft Marketplace Find a partner Resources for Azure partners Get started with Azure Customer stories Analyst reports, white papers, and e-books Videos Learn more about cloud computing Documentation Explore Azure portal Developer resources Quickstart templates Resources for startups Developer community Students Azure for partners Blog Events and Webinars Learn Support Contact Sales Get started with Azure Sign in

If you are building an IoT solution in the cloud, chances are your focus is on the devices and what you can accomplish with them. You might want to process data coming from a network of devices in real time, analyze the data to gain insights, get alerted for special conditions, manage the devices themselves, and so on. What is less interesting to you is setting up and managing the infrastructure in the cloud, which will enable you to do the above. This is where serverless comes in.

Serverless technologies, like Azure Functions, take away the burden of managing infrastructure and enables you to focus on your IoT-powered business logic. IoT projects usually have variable traffic, which means accumulating infrastructure to account for peak loads, isn’t the best strategy. Adopting serverless allows your solutions to scale dynamically while keeping costs low.

This video shows a great application of a serverless architecture to receive data from a device, transform it in real time using machine learning, and send it back to the device. It is based on the DevKit Translator IoT project.

Here we describe a few scenarios in which the combination of Azure IoT Hub, Azure Event Grid, and Azure Functions provide a potent solution to your IoT needs.

Process incoming device data in real time

Most IoT devices generate data that needs to be ingested and processed. 

  • This data could be regular telemetry data that needs to go through some custom processing before being visualized or archived for later analysis. In this case, triggering a serverless function from the built-in Azure Event Hubs endpoint in IoT Hub, is a perfect solution for the custom processing part.
  • It could be a special condition alert, which needs to be acted upon with slightly different (and urgent) custom processing. In this case, triggering a serverless function using the message routing functionality of IoT Hub, for instance with Azure Service Bus queues, is a perfect solution.

Sending messages from cloud to device

Sending messages from your cloud applications to IoT devices is also a common scenario. IoT Hubs facilitate this through API which can be readily consumed from any application. Since sending such data is usually done as a part of a workflow, serverless functions again provide a quick, easy, and scalable mechanism to run the code meant to perform this specific part (firing messages off to devices), without worrying about where this code is running.

Manage and auto-scale your IoT solution

While a serverless backend removes any scale worries for the data processing part of your solution, you still want to ensure that you are appropriately scaling the capacity of IoT Hub itself to manage how much traffic can actually flow through to your serverless backend. This is where the Durable Functions feature of Azure Functions can provide a serverless method of monitoring and scaling the IoT Hubs so that your entire IoT project can effectively be auto-scale.

Additionally, using Azure Event Grid and Azure IoT Hub, you can also respond to device updates, like additions and deletions, in a serverless manner using Functions or Logic Apps.

Custom processing on IoT Edge

Businesses are increasingly demanding low-latency output from their IoT solutions. Solutions like Azure IoT Edge are allowing customers to transfer the capability of cloud technologies to their own devices. There are multiple scenarios in which some custom processing needs to be performed on the device itself without communicating with the cloud. Azure Functions on IoT Edge provides a powerful mechanism through which you can utilize the productive programming model of Azure Functions on your own devices. This allows consistency of architecture across your cloud and Edge applications.

These are just some of the examples of how Azure provides ways of building IoT applications using serverless technologies. The ease of use and low-cost nature of Azure Functions makes it a viable option for experimenting with many other IoT scenarios. We are looking forward to what you will build. 

Resources

WE ARE MICROSOFT

Explore Microsoft Foundry

The future of AI starts here. Envision your next great AI app with the latest technologies. Get started with Azure.