Azure

Azure Functions Triggers Complete Guide: HTTP / Timer / Queue / Service Bus / Cosmos DB Change Feed and All Types

2026-05-24
NicheeLab Editorial Team

Azure Functions Triggers define the conditions that cause a function to run, and they form the core of serverless event-driven architecture. More than 20 Trigger types are available, letting you launch functions from HTTP requests, schedules, queue messages, database changes, and many other events. This article walks through every major Trigger type along with Input and Output Bindings.

Major Triggers at a Glance

TriggerFires onPrimary use case
HTTPHTTP requestREST API / Webhook
TimerCRON expressionBatch / scheduled jobs
Queue StorageStorage Queue messageLightweight async tasks
Service BusService Bus message / topicEnterprise messaging
Blob StorageBlob created / updatedFile / image processing
Event GridAzure resource eventsReactive event processing
Event HubStreaming dataIoT / telemetry / log aggregation
Cosmos DB Change FeedCosmos DB insert / updateData change tracking / integration
SignalRReal-time connectionWebSocket communication
KafkaKafka messageStreaming integration (Premium)
SQL (Preview)SQL Server changesRDB change tracking

HTTP Trigger

Runs a function in response to an HTTP request — ideal for implementing REST APIs and webhooks.

Characteristics

  • Supports HTTP methods such as GET / POST / PUT / DELETE
  • Route Template (e.g., orders/{orderId}) extracts URL parameters
  • Authentication Level: Anonymous (no auth), Function (Function Key required), Admin (Host Key required)
  • 240-second timeout on Consumption Plan, 60 minutes on Premium
  • OAuth 2.0 is easy to implement via Microsoft Entra ID integration (Easy Auth)

In production, expose functions through Azure API Management; direct exposure is recommended only for internal use. Cold start is 2-10 seconds on Consumption, but 0 seconds with Always Ready on Premium / Flex Consumption.

Timer Trigger

Runs a function on a schedule defined by a CRON expression — the go-to choice for batch processing and scheduled tasks.

CRON Expression

Azure uses an extended 6-field CRON format (second minute hour day month day-of-week).

  • 0 0 8 * * *: every day at 8 AM
  • 0 */15 * * * *: every 15 minutes
  • 0 0 9 * * MON-FRI: weekdays at 9 AM
  • 0 0 0 1 * *: midnight on the 1st of each month

Typical Use Cases

  • Nightly DB backups and data aggregation
  • Hourly API health checks
  • Weekly report generation
  • Monthly invoice generation

Timer Trigger is guaranteed to run exactly once in a distributed environment (Singleton) and will not double-fire across instances.

Queue Storage vs Service Bus

ItemQueue StorageService Bus
CostCheapestHigher
Max message size64 KB256 KB (Standard) / 1 MB (Premium)
FIFO guaranteeNoVia Sessions
TransactionNoYes
Dead Letter QueueNoYes
Duplicate DetectionNoYes
Pub/SubNoTopic + Subscriptions
Use caseLightweight async processingEnterprise messaging

Event Grid vs Event Hub

ItemEvent GridEvent Hub
Delivery modelPush (notifies subscribers)Pull (sequential processing)
ThroughputThousands of events per secondMillions of events per second
Use caseReactive event processingHigh-volume streaming
Event sourceAzure resource changes / customIoT / telemetry / logs
ExampleBlob upload → automated processingIoT data aggregation

Cosmos DB Change Feed Trigger

Runs a function on insert / update events in a Cosmos DB Container.

Typical Use Cases

  • Cosmos DB data change → automatic Azure AI Search index update
  • Order data insert → triggers an email notification function
  • User profile update → cache invalidation
  • Real-time analytics pipelines

Characteristics

  • Lease Container manages checkpoints
  • Parallel processing across instances (leased per partition)
  • Processes only deltas since the last insert
  • Supports both Pull and Push modes

The standard pattern for real-time Cosmos DB integration, also commonly used as the entry point for AI / ML data pipelines.

Blob Storage Trigger

Fires when a blob is created or updated in Blob Storage.

Typical Use Cases

  • Image upload → thumbnail generation
  • Video upload → encoding
  • Document upload → OCR / full-text search indexing
  • Log files → aggregation processing

Caveats

  • Polling-based, with a delay of several to tens of seconds
  • For high-frequency, low-latency requirements, use Event Grid Trigger instead (push-delivered Blob Created events)
  • For large blobs, the Blob Storage Queue Trigger pattern is also effective

Input / Output Binding

Bindings declaratively integrate Triggers with other services — you can implement integration with other Azure services using just JSON configuration, with no SDK code required.

How It Works

  • Input Binding: fetches data from another service when the function starts (e.g., retrieve the relevant record from Cosmos DB)
  • Output Binding: writes data to another service after the function runs (e.g., send a message to a Storage Queue)

Example: HTTP Trigger + Cosmos DB Input + Service Bus Output

{
  "bindings": [
    {
      "type": "httpTrigger",
      "name": "req",
      "route": "orders/{orderId}",
      "methods": ["get"]
    },
    {
      "type": "cosmosDB",
      "name": "order",
      "direction": "in",
      "databaseName": "Orders",
      "collectionName": "Items",
      "id": "{orderId}",
      "partitionKey": "{orderId}",
      "connectionStringSetting": "CosmosDBConnection"
    },
    {
      "type": "serviceBus",
      "name": "outputMessage",
      "direction": "out",
      "queueName": "processed-orders",
      "connection": "ServiceBusConnection"
    }
  ]
}

Supported Services

  • Storage (Blob/Queue/Table)
  • Cosmos DB
  • Service Bus
  • Event Hub
  • Event Grid
  • SignalR
  • SendGrid (email)
  • Twilio (SMS)
  • GraphQL
  • SQL (Preview)

Durable Functions

Durable Functions is an extension of Functions that enables stateful orchestration — long-running workflows, human-approval waits, and complex state transitions.

  • Function Chaining: sequential execution (A → B → C)
  • Fan-out / Fan-in: parallel execution with result aggregation
  • Async HTTP API: async API for long-running processing
  • Monitor: periodic status checks
  • Human Interaction: approval-wait workflows

Best Practices

  1. One Trigger per Function (functions with multiple Triggers are discouraged)
  2. Use Input/Output Bindings for cross-service integration; avoid direct SDK calls
  3. Expose HTTP Triggers via API Management; direct exposure is for internal use only
  4. Timer Trigger prevents duplicate firing in distributed environments (Singleton behavior)
  5. Move long-running processing to Durable Functions or Container Apps
  6. Service Bus for enterprise, Queue Storage for lightweight tasks
  7. Event Hub for high-volume streaming, Event Grid for reactive scenarios
  8. Use Change Feed Trigger to make Cosmos DB integration real-time
  9. Use Application Insights to observe function executions
  10. Use Managed Identity to authenticate to other Azure services (eliminate connection strings)

Related Certifications

Frequently Asked Questions

What is an Azure Functions Trigger?

A Trigger defines the condition that causes an Azure Functions function to run. Each function has exactly one Trigger, and when the Trigger fires, the function code executes automatically. Major Triggers include HTTP, Timer, Queue Storage, Blob Storage, Service Bus, Event Hub, Cosmos DB Change Feed, Event Grid, SignalR, SQL (Preview), Kafka, and RabbitMQ — 20+ types in total. A Function App can host multiple functions, each with its own independent Trigger. You can also combine Input Bindings (fetch data on startup) and Output Bindings (write data after execution) to declaratively integrate Triggers with other services. This is the biggest strength of Functions and forms the core of serverless event-driven architecture.

What are the characteristics of HTTP Trigger?

HTTP Trigger runs a function in response to an HTTP request — ideal for implementing REST APIs and webhooks. It supports HTTP methods such as GET/POST/PUT/DELETE and lets you extract URL parameters via Route Templates (e.g., orders/{orderId}). Authentication levels: Anonymous (no auth), Function (Function Key required), Admin (Host Key required). In production, expose functions through Azure API Management; direct exposure should be limited to internal use. Timeout is 240 seconds on Consumption Plan and 60 minutes on Premium. Cold start is 2-10 seconds on Consumption, but 0 seconds with Always Ready on Premium / Flex Consumption. OAuth 2.0 authentication can be implemented easily via Microsoft Entra ID integration (Easy Auth).

How do you use Timer Trigger?

Timer Trigger runs a function on a schedule defined by a CRON expression — the go-to choice for batch processing and scheduled tasks. The CRON expression has 6 fields (second minute hour day month day-of-week); for example, '0 0 8 * * *' runs every day at 8 AM. Typical use cases: 1) nightly DB backups and data aggregation, 2) hourly API health checks, 3) weekly report generation, 4) monthly invoice creation. Note: On Consumption Plan, cold starts mean second-level precision is not guaranteed; for second-accurate scheduling, use Premium. Timer Trigger is guaranteed to run exactly once in a distributed environment (Singleton) and will not double-fire across instances. However, if two Function Apps have the same Timer Trigger, both will fire — proper isolation is required.

What is the difference between Queue Storage Trigger and Service Bus Trigger?

Queue Storage Trigger fires when a message is added to an Azure Storage Queue — simple and the cheapest option, with a max message size of 64 KB and no FIFO guarantee. Service Bus Trigger fires on Azure Service Bus messages and offers enterprise features (sessions, FIFO guarantee, transactions, dead-letter queue, duplicate detection), with a max message size of 256 KB (Standard) / 1 MB (Premium) at a higher cost. Decision guide: 1) simple async processing → Queue Storage, 2) enterprise messaging (deduplication, ordering, transactions) → Service Bus, 3) Pub/Sub pattern → Service Bus Topic + Subscriptions. The rule of thumb is: Service Bus is the enterprise standard, while Queue Storage is the economical choice for lightweight task queues.

What is the difference between Event Grid Trigger and Event Hub Trigger?

Event Grid Trigger receives push-delivered state-change events on Azure resources (blob creation, resource-group changes, custom events) — built for reactive event processing. Use case: blob upload triggers automated image processing. Event Hub Trigger handles high-throughput streaming data (IoT, telemetry, logs) with partition-based parallelism. Use case: aggregating IoT device data for real-time analytics. The fundamental difference: Event Grid is push-based notification to subscribers, while Event Hub is pull-based sequential processing of large event streams. Event Grid scales to thousands of events per second; Event Hub scales to millions. Choose based on throughput requirements.

What is Cosmos DB Change Feed Trigger?

Cosmos DB Change Feed Trigger fires on insert/update events in a Cosmos DB Container. Typical use cases: 1) Cosmos DB data change triggers automatic Azure AI Search index updates, 2) order data inserts trigger email notification functions, 3) user profile updates trigger cache invalidation, 4) real-time analytics pipelines. A lease container manages checkpoints (tracking what has been processed), multiple instances process in parallel (leasing per partition), and only deltas since the last insert are processed. Both Pull mode and Push mode are supported. This is the standard pattern for Cosmos DB real-time integration and is also commonly used as the starting point for AI / machine-learning data pipelines.

How do you use Input / Output Bindings?

Bindings declaratively integrate Triggers with other services. Input Binding fetches data from another service when the function starts (e.g., retrieve the relevant record from Cosmos DB). Output Binding writes data to another service after the function runs (e.g., send a message to Storage Queue). Example: an HTTP Trigger receives an orderId, uses Cosmos DB Input Binding to fetch order data, processes it, then sends a message to the next step via Service Bus Output Binding — implemented entirely with JSON configuration (no SDK code required). Supported services include Storage (Blob/Queue/Table), Cosmos DB, Service Bus, Event Hub, Event Grid, SignalR, SendGrid, Twilio, and GraphQL. This is a powerful feature that achieves cross-service integration in serverless architectures with minimal code.

Which certifications are related?

AZ-204 (Developer Associate; note: retires 2026-07) is the flagship certification — its Domain 1 (Compute, 25-30%) tests all Functions Trigger types in depth. AZ-305 (Solutions Architect Expert) covers serverless architecture design from an architect's perspective; AZ-400 (DevOps Engineer Expert) covers Functions CI/CD pipelines; AI-103 (GA 2026-06) covers building AI pipelines with Cosmos DB Change Feed + Functions. Functions is the core of Azure serverless, and deep understanding is essential for both developers and architects.

Related Articles and Technical Deep Dives

Azure AI エンジニア キャリアロードマップ|AI-901 → AI-103 → 生成 AI アーキテクトへの道【2026 年版】

Azure AI エンジニアになるための認定取得ロードマップ完全版。AI-901 (2026-06 GA、AI-900 後継) → AI-103 (2026-06 GA、AI-102 後継) の最新ルート、Azure AI Foundry / Agent Service / OpenAI 中心の生成 AI 時代の構成、Databricks GenAI / OpenAI Direct との二刀流戦略、年収レンジまで日本語で網羅。

AZ-204 完全ガイド|Microsoft Azure Developer Associate【2026 年 7 月リタイア注意】

Microsoft Azure Developer Associate (AZ-204) の完全ガイド。5 ドメインの出題範囲、App Service / Functions / Cosmos DB SDK / Service Bus などの開発者向け機能、2026 年 7 月 31 日のリタイア対応戦略、AZ-104 / AZ-400 / AI-103 への代替ルート、駆け込み受験の判断材料を日本語で網羅。

AI-103 完全ガイド|Developing AI Apps and Agents on Azure【2026 年 6 月 GA・AI-102 後継】

Microsoft Certified: Developing AI Apps and Agents on Azure (AI-103) の完全ガイド。AI-102 の後継として 2026 年 6 月 30 日 GA。Azure AI Foundry / Agent Service / OpenAI / AI Search を中心に、RAG パターン・Agent オーケストレーション・Responsible AI・Semantic Kernel SDK の実装スキル、3-4 ヶ月の合格ロードマップを日本語で網羅。

Azure AI Foundry 完全ガイド|Hub/Project・Prompt Flow・Agent Service・Model Catalog・Fine-tuning【2026 年版】

Microsoft Azure AI Foundry (旧 AI Studio) の完全ガイド。Hub-Project 階層・Prompt Flow LLM ワークフロー・Agent Service・Evaluation メトリクス・Model Catalog (1,800+ モデル)・Fine-tuning・Content Safety・関連認定試験 (AI-103 / AI-901) を日本語で網羅。

The technical information in this article is based on the Azure Functions Documentation. This article is not an official product of Microsoft Corporation and has no affiliation or sponsorship with Microsoft. Microsoft and Azure are trademarks of the Microsoft group of companies. Information is based on official public materials as of May 24, 2026. Always check the official pages for the latest information.

Check what you learned with practice questions

Practice with certification-focused question sets

View Azure exam prep page
Author

NicheeLab Editorial Team

NicheeLab editorial team focused on data engineering and cloud certification learning. Content is structured around practical study needs and official exam domains.


Related articles
Azure

AZ-900 Azure Fundamentals: Complete Exam Guide (2026)

Pass AZ-900 — cloud concepts, Azure architecture, management...

Azure

Azure Certification Roadmap: Which Cert to Take Next (2026)

Choose your Azure certification path — Fundamentals, Associa...

Azure

AI-901 Azure AI Fundamentals (Beta): Complete Guide (2026)

Pass AI-901 — Microsoft Foundry, generative AI, responsible ...

Azure

Microsoft Entra ID Fundamentals for Azure Certs (2026)

Entra ID basics every cert candidate needs — tenants, identi...

Azure

DP-900 Azure Data Fundamentals: Complete Guide (2026)

Pass DP-900 — relational, non-relational, analytics, Power B...

Browse all Azure articles (104)
© 2026 NicheeLab All rights reserved.