//Functions

Instant serverless functions for every workload

Run your code in the path of every request, close to your users, with no cold starts. Your functions read and write KV Store, SQL Database, and Object Storage, and call AI Inference.

Your stack, your way
  • Next.js
  • Astro
  • React
  • Vue
  • Angular
  • Nuxt
  • Gatsby
  • Hugo
  • Preact
  • Qwik
  • VitePress
  • Docusaurus
  • Eleventy
  • Hexo
  • Jekyll
  • Hono
  • Node.js
  • Terraform
  • GitHub

No cold starts, no servers

A rule in your application triggers your function on each matching request, with no cold start. Billing follows compute time and invocations.

Web-standard JavaScript and TypeScript

Handlers use Web-standard Request and Response objects, and Azion Bundler turns framework projects into functions.

Your data and AI, one call away

Your code reads and writes KV Store, SQL Database, and Object Storage and calls AI Inference, on the platform that runs your security.

Security decisions in code

A function on a firewall can add headers, deny, or drop a request before it reaches your application.

Logs grouped by request

The messages your code logs reach Real-Time Events and Data Stream grouped by request ID, so everything one request did stays together.

Deploy from the tools you use

Ship from Azion Console, the Azion CLI, the API, Terraform, or a coding agent such as Claude Code or Cursor, and test locally first.

//Features

Build, run, and reuse your functions

Write in the languages and frameworks you already use, and run the same function wherever your applications need it.

Build with familiar frameworks. Write Functions in JavaScript, TypeScript, or languages that compile to WebAssembly, or with the frameworks you already use: Next.js, Astro, Nuxt, React, Vue, Angular, and many more.

Docs

Serverless runtime built for every workload. Use Functions as a programmable layer between users, storefronts, APIs, and origins. Adapt requests in real time without changing your backend architecture.

Docs

One function, many applications. Use the same function in several applications and firewalls, and configure each instance with its own arguments.

Docs
//Integrations

From Hello World to full-stack applications

Functions reaches the Azion products your application needs from the same code.

  1. Create a database, run statements, and query rows with the azion/sql library.

    sql.ts
    01import { createDatabase } from 'azion/sql';
    02import type { AzionDatabase, AzionDatabaseResponse } from 'azion/sql';
    03
    04const { data: database, error }: AzionDatabaseResponse<AzionDatabase> =
    05 await createDatabase('app-data', { debug: true });
    06
    07if (error || !database) {
    08 throw new Error(error?.message ?? 'Failed to create database');
    09}
    10
    11await database.execute([
    12 'CREATE TABLE IF NOT EXISTS comments (id INTEGER PRIMARY KEY, text TEXT)',
    13 "INSERT INTO comments (text) VALUES ('Hello from Azion')"
    14]);
    15
    16const { data: comments } = await database.query([
    17 'SELECT * FROM comments'
    18]);
    19
    20console.log(comments?.rows);
  2. Set and read keys with an expiration through the azion/kv client.

    kv.ts
    01import { createClient } from 'azion/kv';
    02import type { KVClient } from 'azion/kv';
    03
    04const client: KVClient = await createClient({
    05 namespace: 'app-state'
    06})
    07 .on('error', (err) => console.error('KV error:', err))
    08 .connect();
    09
    10await client.set(
    11 'todo:1',
    12 JSON.stringify({ title: 'Ship release', done: false }),
    13 { expiration: { type: 'EX', value: 3600 } }
    14);
    15
    16const todo = await client.get('todo:1');
    17
    18console.log(todo);
  3. Create a bucket your workloads can read and write, and upload objects with azion/storage.

    storage.ts
    01import { setupStorage } from 'azion/storage';
    02import type { AzionBucket, AzionStorageResponse } from 'azion/storage';
    03
    04const { data: bucket, error }: AzionStorageResponse<AzionBucket> =
    05 await setupStorage({
    06 name: 'app-assets',
    07 workloads_access: 'read_write'
    08 });
    09
    10if (error || !bucket) {
    11 throw new Error(error?.message ?? 'Failed to setup storage');
    12}
    13
    14await bucket.createObject({
    15 key: 'config.json',
    16 content: JSON.stringify({ theme: 'dark' }),
    17 params: { content_type: 'application/json' }
    18});
    19
    20console.log(`Object uploaded to ${bucket.name}`);
  4. Pass a model id and messages to Azion.AI.run and return the answer in the same request.

    ai.ts
    01export default {
    02 async fetch(request: Request): Promise<Response> {
    03 const { prompt } = await request.json();
    04
    05 const modelResponse = await Azion.AI.run(
    06 'Qwen/Qwen3-30B-A3B-Instruct-2507-FP8',
    07 {
    08 messages: [
    09 {
    10 role: 'system',
    11 content: 'You are a helpful assistant.'
    12 },
    13 {
    14 role: 'user',
    15 content: prompt
    16 }
    17 ]
    18 }
    19 );
    20
    21 return Response.json(modelResponse);
    22 }
    23};
//Use cases

What can you build with Azion Functions?

Functions runs the logic. See how to build each one in the docs.

Docs

Deploy full-stack applications globally

Run your interface and server logic close to your users, with your data on Azion or in a database you already run.

Build REST and GraphQL APIs

Write your API as functions for users in every region, with no servers to operate.

Build AI agents

Run the agent loop as functions that call your APIs and SaaS tools and keep state across steps.

Modernize a monolithic application without a rewrite

Move one route at a time to functions, while every route you haven't migrated keeps reaching the monolith.

Contabilizei
With Azion, Contabilizei improved request delivery at the Edge, reduced infrastructure costs, and gained fast access to support whenever needed.
Fabrício SantosDevSecOps Manager at Contabilizei

Serverless AI-native primitives for autonomous workloads

Frequently asked questions

Build your next app today

Pick a template and deploy it in seconds, or talk to a specialist about your workload.

Function Starter KitHello World app powered by a function.
Deploy now
AI Inference Starter KitAI app with no origin dependency.
Deploy now
Next.js E-commerceNext.js storefronts to choose from.
Deploy now
LangGraph AI Agent BoilerplateAI agent with RAG, built with LangGraph.
Deploy now
React BoilerplateReact single-page application.
Deploy now
Next.js Static BoilerplateNext.js single-page application.
Deploy now
Astro BoilerplateBasic Astro project for content-driven sites.
Deploy now
Vue BoilerplateVue single-page application.
Deploy now
Angular BoilerplateAngular single-page application.
Deploy now
Nuxt ContentBlog or docs site with Nuxt Content.
Deploy now
Astro E-commerceAstro storefronts to choose from.
Deploy now
Neon Database Starter KitApp connected to Neon with Drizzle ORM.
Deploy now
Turso Starter KitApp connected to Turso with Drizzle ORM.
Deploy now
Upstash GeoLocationMessages by the user's location.
Deploy now
Qwik BoilerplateProject based on the Qwik framework.
Deploy now
Docusaurus TypeScript BoilerplateStatic Docusaurus project in TypeScript.
Deploy now