U

Ultimate Azure Functions

Production-ready skill that handles expert, patterns, azure, functions. Includes structured workflows, validation checks, and reusable patterns for development.

SkillClipticsdevelopmentv1.0.0MIT
0 views0 copies

Ultimate Azure Functions

A Claude Code skill for building serverless applications on Microsoft Azure. Covers Azure Functions development with the modern isolated worker model, trigger types, bindings, Durable Functions for orchestration, and deployment with Azure DevOps or GitHub Actions.

When to Use This Skill

Choose Ultimate Azure Functions when:

  • You're building serverless applications on Azure
  • You need Azure Functions with HTTP, Timer, Queue, or Blob triggers
  • You want to implement Durable Functions for workflow orchestration
  • You need to set up CI/CD for Azure Functions deployment
  • You want to optimize Azure Functions performance and costs

Consider alternatives when:

  • You need AWS serverless (use an AWS Serverless skill)
  • You want container-based deployment (use a Docker/Kubernetes skill)
  • You need general .NET development (use a .NET development skill)

Quick Start

# Install Azure Functions Core Tools npm install -g azure-functions-core-tools@4 # Install the skill claude install ultimate-azure-functions # Create a Function App claude "Create an Azure Functions project with TypeScript: HTTP trigger, Timer trigger, and Queue trigger" # Deploy with GitHub Actions claude "Set up GitHub Actions deployment for my Azure Functions app to staging and production slots"

Core Concepts

Programming Models

ModelRuntimeLanguageStatus
Isolated Worker (.NET)Out-of-processC#Recommended
In-Process (.NET)In-processC#Legacy
Node.js v4Out-of-processTypeScript/JSRecommended
Python v2Out-of-processPythonRecommended

Trigger Types

TriggerFires WhenCommon Use Case
HTTPHTTP request receivedREST APIs, webhooks
TimerCRON scheduleScheduled jobs, cleanup tasks
QueueMessage added to Azure QueueAsync processing
BlobFile uploaded to Blob StorageFile processing, image resize
Cosmos DBDocument changed in Cosmos DBChange feed processing
Event GridEvent publishedEvent-driven architectures
Service BusMessage receivedEnterprise messaging

Node.js v4 HTTP Function

import { app, HttpRequest, HttpResponseInit } from '@azure/functions'; app.http('getUser', { methods: ['GET'], authLevel: 'function', route: 'users/{id}', handler: async (request: HttpRequest): Promise<HttpResponseInit> => { const id = request.params.id; const user = await getUserById(id); return user ? { jsonBody: user } : { status: 404, jsonBody: { error: 'User not found' } }; }, });

Configuration

ParameterTypeDefaultDescription
runtimestring"node"Runtime: node, dotnet, python, java
languagestring"typescript"Language: typescript, javascript, csharp, python
planstring"consumption"Plan: consumption, premium, dedicated
auth_levelstring"function"Auth: anonymous, function, admin
deploymentstring"github_actions"Deploy: github_actions, azure_devops, cli

Best Practices

  1. Use the v4 programming model — The v4 model (Node.js) and isolated worker model (.NET) are the modern approach. They provide better dependency injection, middleware support, and testability. Avoid the older in-process model for new projects.

  2. Use Consumption plan for unpredictable traffic — Consumption plan scales to zero and you only pay when functions execute. Use Premium plan only if you need VNet integration, no cold starts, or longer execution times.

  3. Implement Durable Functions for workflows — For multi-step processes (order processing, approval flows), use Durable Functions instead of chaining regular functions with queues. Durable Functions handle retries, state, and orchestration automatically.

  4. Use deployment slots for zero-downtime updates — Deploy to a staging slot, verify, then swap to production. This prevents downtime and allows instant rollback if issues are discovered.

  5. Monitor with Application Insights — Enable Application Insights for automatic telemetry. Track custom metrics for business-relevant events. Set up alerts for error rates and performance degradation.

Common Issues

Cold starts on Consumption plan — Pre-warm functions with a Timer trigger that runs every 5 minutes, or upgrade to Premium plan with always-ready instances. Keep function packages small to reduce startup time.

Function timeout after 5 minutes — The default Consumption plan timeout is 5 minutes (max 10). For longer operations, use Durable Functions which can run for days. Alternatively, use a Premium or Dedicated plan with higher timeout limits.

Queue messages processed multiple times — Azure Queue has at-least-once delivery. Implement idempotent processing using the message dequeue count and a processed-messages cache. Check context.retryContext to handle retries gracefully.

Community

Reviews

Write a review

No reviews yet. Be the first to review this template!

Similar Templates