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.
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 function | Your first Edge Function |
| Call a function and know who is calling | Invoke a function |
| Handle failures, timeouts and retries | Errors, timeouts and retries |
| Return text, an image or HTML | Return text, binary and HTML |
| Give a function an API key | Secrets and environment variables |
| Run work in the background or on a schedule | Jobs, cron and the dead-letter queue |
| Be warned when something goes wrong | Alerts |
| Test locally and deploy from CI | Test and deploy from CI |
| Look up a command | aura functions and aura secrets |
| Look up a route | HTTP API reference |
| Look up an SDK method | JavaScript SDK: functions |
| Know the sizes, durations and quotas | Limits and quotas |
| Understand what happens during a call | How an invocation works |
| Understand who can do what | Security model |
| Move to SDK 0.6 | Upgrade to SDK 0.6 |
#
Facts
Facts to know first
- Only invoking a function works with the public key. Everything else needs a
service_rolekey 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 setorPUT /env. Encryption at rest applies only on thePUTpath and only when the deployment has a key. - What a function writes with
console.logis 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