Course Introduction
Azure Functions & Triggers
Output Bindings
Input Bindings
Durable Functions
Course Summary
The course is part of these learning paths
This course is an introduction to Azure Functions. It explains how Azure Functions are little bits of your application logic that live in the cloud. The course includes how to activate—or what we call trigger—your Azure Functions, how to pass data to and from them, and also how to tie different Azure Functions together using an extension of Azure Functions called Durable Functions.
This course provides hands-on demonstrations of how to create different kinds of Azure Functions, how to create bindings to other Azure Services from those functions, and how to create a Durable Function to manage state from one Azure Function to the next.
If you have any feedback related to this course, please contact us at support@cloudacademy.com.
Learning Objectives
- Create Azure Functions with different types of Triggers
- Implement input and output bindings to different types of data resources
- Create Durable Functions to orchestrate related Azure Functions
- Log the results with Dependency Injection
Intended Audience
Software developers who want to learn how to implement Azure Functions as a part of their cloud software design.
Prerequisites
To get the most out of this course, you should have some experience will the following:
- Event-driven programming
- Servers and APIs
- Coding with C# and JSON
- Project creation in Visual Studio
Resources
The GitHub repository for this course can be found here.
You would typically use Azure Functions to run bits of your overall application logic on-demand in the same way that you use any other HTTP-accessible endpoint. Just as with any other API endpoint or library function, you create a serverless Azure Function to do some compute work as a part of a larger logic landscape. You can configure Azure Functions and pass data to and from them using a wide range of architectures.
As I mentioned, Azure Functions are just HTTP endpoints that you can call in the same way that you call any other API endpoint from within your code or other process. However, instead of residing on a standard web server that is operational 24/7/365, your Azure Function is available, quote, on demand whenever you call it. The endpoint is not provisioned into the cloud until it is called. As a result, because your cloud services charge you per minute for any resource in use, an Azure Function is typically less costly to operate than a typical API endpoint web server that's running and available all the time.
And when do you use Azure Functions? Well, Azure Functions have triggers that cause them to execute. So they are especially useful when responding to events such as data coming or going, timers going off, or even HTTP requests coming in. If you have some code that you want to execute based only on a particular event, one that may or may not occur regularly, Azure Functions can be a solution.
As I mentioned, triggers for your Azure Function can include timers, data operations, and standard HTTP calls or webhooks. Triggers are created in a configuration file that is a companion to your Azure Function. As we'll see when we write our first Azure Function, the trigger type you choose actually defines your project.
Azure Functions connect to your data stores and resources through the use of bindings. Input bindings provide any needed data to your Azure Function and output bindings receive any results. Bindings are created in the same configuration file I mentioned that is the companion to your Azure Function when you publish it.
We will cover the implementation of triggers and bindings in the first part of the course.
Because Azure Functions employ the on-demand services model I mentioned earlier, they are typically stateless. Azure Functions are serverless meaning there is no host server to hold or store information between calls. Your Azure Function is provisioned into the cloud when it needs to run and de-provisioned immediately afterwards so there is no concept of state connected to it.
However, there is an extension to standard Azure Functions called Durable Functions that does allow you to manage state/coordination of different Azure Functions. It's a very useful feature in a serverless environment. We will cover the use of Durable Functions in the second part of the course.
David Gaynes is a software and cloud architect for .NET, NodeJS, Azure and AWS. He has been developing .NET and Cloud software for more than 20 years, with some of that time spent at Microsoft, and has authored both technical and non-technical teaching materials as books and in other formats. He enjoys physics, meditation, and experiencing the natural wonders of Hawaii.