Aurabase Logo
aurabasedocs
docs›Services›Edge Functions

Edge Functions

Write a function in TypeScript, deploy it with one command, and call it from your app with the public key.

4 min read·Level beginner·Revised on Oct 12, 2026
This English text was generated automatically from the French original and has not been reviewed yet.
#
Overview

One function, three ways to trigger it

An Edge Function is a piece of server code that Aurabase stores for your project and runs on demand. You trigger the same function in three ways:

  • A call: your app calls aura.functions.invoke('name'), or sends an HTTP request, and gets the answer.
  • A job: you enqueue a call to run in the background, with a delay and automatic retries.
  • A schedule: a cron entry enqueues a job at the times you choose.

There are two runtimes: Deno (TypeScript or JavaScript, the default) and WASM (a compiled Rust binary). Each call runs in its own isolated worker with a memory limit and a timeout.

#
Contract

The contract of a function

A Deno function is one file that calls Deno.serve. It receives the request you described and returns a Response.

aurabase/functions/hello/index.tstypescript
Deno.serve(async (req) => {
  const { name = 'world' } = await req.json().catch(() => ({}))
  return Response.json({ greeting: `Hello, ${name}!` })
})

An export default is never called. A function is a single file: relative imports are not shipped, so use npm: or https://esm.sh/ imports.

#
Map

Find what you need

I want to…Read
Deploy and call my first functionYour first Edge Function
Call a function and know who is callingInvoke a function
Handle failures, timeouts and retriesErrors, timeouts and retries
Return text, an image or HTMLReturn text, binary and HTML
Give a function an API keySecrets and environment variables
Run work in the background or on a scheduleJobs, cron and the dead-letter queue
Be warned when something goes wrongAlerts
Test locally and deploy from CITest and deploy from CI
Look up a commandaura functions and aura secrets
Look up a routeHTTP API reference
Look up an SDK methodJavaScript SDK: functions
Know the sizes, durations and quotasLimits and quotas
Understand what happens during a callHow an invocation works
Understand who can do whatSecurity model
Move to SDK 0.6Upgrade to SDK 0.6
#
Facts

Facts to know first

  • Only invoking a function works with the public key. Everything else needs a service_role key and belongs on your server.
  • Requests and responses must stay below about 256 KiB. Use Storage for larger data.
  • Every call is stateless. Do not keep data in memory between calls.
  • Secrets are variables of the function, set with aura secrets set or PUT /env. Encryption at rest applies only on the PUT path and only when the deployment has a key.
  • What a function writes with console.log is not available to you yet. See limits for the current gaps.
  • There is one region and no version history: keep your functions in Git.
Last updated · Oct 12, 2026