Free course · From scratch to advanced

Azure Functions

Build serverless apps in C# with Azure Functions: triggers and bindings, HTTP, timers and queues, Durable Functions, hosting plans, security and deployment, with a diagram for every topic.

Module 1

Getting started

What Azure Functions is, how to create and run your first C# function locally, and how triggers and bindings connect it to other services.

  1. Lesson 1: What is Azure Functions?Beginner

    Azure Functions runs small pieces of your code when something happens: an HTTP request, a timer, a queue message or a new file. Azure starts, scales and stops the servers for you, so you write the code that reacts to the event and nothing else.

  2. Lesson 2: Your first function in C#Beginner

    Create a function app in C# with the isolated worker model, look at what each generated file does, and run an HTTP function on your own computer before anything goes to Azure.

  3. Lesson 3: Triggers and bindingsBeginner

    Triggers start a function and bindings connect it to other services without writing client code. Together they are what makes functions short: the plumbing is declared with attributes and the method holds only your logic.

  4. Lesson 4: Local settings, Azurite and Core ToolsBeginner

    Before deploying anything, you can run and debug a whole function app on your own computer. This lesson covers local.settings.json, Azurite as a local Storage account, and the Core Tools commands you will use every day.

Module 2

Triggers in practice

Run code on HTTP requests, on a schedule, for queue and Service Bus messages, and when files land in Blob Storage.

  1. Lesson 5: HTTP-triggered functionsBeginner

    HTTP-triggered functions turn a method into a small web endpoint. With ASP.NET Core integration you use the familiar HttpRequest, model binding and IActionResult, plus routes and authorization levels from the trigger attribute.

  2. Lesson 6: Running functions on a scheduleBeginner

    A timer trigger runs a function on a schedule written as an NCRONTAB expression. It replaces Windows scheduled tasks and cron jobs for things like nightly clean-ups, reports and data syncs.

  3. Lesson 7: Queue and Service Bus triggersIntermediate

    Queues let one part of a system hand work to another without waiting. Azure Functions can be triggered by Azure Storage queues for simple jobs and by Azure Service Bus when you need topics, sessions, dead-lettering and larger messages.

  4. Lesson 8: Reacting to new files: Blob and Event GridIntermediate

    Functions can react when files land in Blob Storage, and to events from almost any Azure service through Event Grid. The modern way to trigger on blobs uses Event Grid underneath for speed and reliability.

Module 3

Building real function apps

Dependency injection and configuration, writing to several outputs, handling failures and retries, and logging with Application Insights.

  1. Lesson 9: Dependency injection and configurationIntermediate

    The isolated worker model uses the same hosting, dependency injection and configuration as ASP.NET Core. You register services in Program.cs, inject them through constructors and bind settings to typed options.

  2. Lesson 10: Writing to queues, blobs and databases with output bindingsIntermediate

    Output bindings let a function write to another service just by returning a value: put a message on a queue, write a blob, send to Service Bus or save a Cosmos DB document, without writing client code.

  3. Lesson 11: Errors, retries and idempotencyIntermediate

    Things fail in the cloud: a database times out, an API returns 503, a message has bad data. Good function apps decide which failures to retry, which to give up on, and make sure a retry never does the work twice.

  4. Lesson 12: Logging and monitoring with Application InsightsIntermediate

    When a function fails at 3 a.m. you need to see what happened. Azure Functions integrates with Application Insights for logs, requests, dependencies, failures and live metrics, and you control what is collected.

Module 4

Durable Functions

Write long-running, stateful workflows in code with orchestrators and activities, and the patterns they make easy.

  1. Lesson 13: Durable Functions: orchestrators and activitiesIntermediate

    Durable Functions lets you write long-running, stateful workflows as ordinary C# code. An orchestrator calls activities, waits for results or events, and the framework saves its progress so it survives restarts.

  2. Lesson 14: Durable patterns: fan-out, approvals and status APIsAdvanced

    Most Durable Functions workflows use a handful of patterns: chaining steps, fanning out work in parallel, long-running HTTP APIs, monitors, waiting for a human, and durable entities for small pieces of state.

Module 5

Hosting and production

Choose a hosting plan, keep function apps secure without secrets, deploy them safely and keep them fast and cheap.

  1. Lesson 15: Hosting plans and scalingIntermediate

    The hosting plan decides how your function app scales, how long functions can run, whether it can reach private networks and how you pay. Picking the right one is one of the first design decisions.

  2. Lesson 16: Securing function appsIntermediate

    A function app holds connection strings, keys and data, and HTTP functions are open to the internet. Secure it with managed identities instead of secrets, proper authentication, and network controls.

  3. Lesson 17: Deploying with GitHub ActionsIntermediate

    Deploying a function app should be repeatable and safe: build once in CI, sign in to Azure without stored passwords, deploy a package, and be able to roll back.

  4. Lesson 18: Cold starts, performance and costAdvanced

    Functions can be very cheap or surprisingly expensive, and fast or slow, depending on a few habits: reusing connections, staying async, tuning concurrency and choosing the right plan.