Edge Functionsglobally in seconds
Author, deploy, and monitor serverless functions distributed globally at the edge, close to your users.
Fully managed
Edge Functions scale automatically, reducing your devops burden
Global deployments
Deploy worldwide for maximum resiliency and low latency
Secure and Scalable
Simply write your code in TypeScript and deploy
Node.js Support
Migrate existing workloads with NPM and Node.js support
Supabase gave us the flexibility and scalability needed at every growth stage. It's rare to find a tool that works just as well for startups as it does for large-scale operations.
What you can build
with Edge Functions
View all examplesSending Emails
Send transactional emails from Edge Functions using Resend.
Generating OpenAI GPT3 completions
Generate text completions using OpenAI's GPT-3 API from Edge Functions.
Stripe Webhooks
Handle Stripe webhook events securely in Edge Functions.
Connecting directly to Postgres
Connect to your Postgres database directly from Edge Functions.
Huggingface Image Captioning
Generate image captions using Hugging Face models.
Upload files to Storage
Upload files to Supabase Storage from Edge Functions.
Delightful DX from
local to production
Edge Functions are built on Deno, enabling a secure, fast, and modern development experience from your local machine to global deployment.
First-class local dev
Develop and test Edge Functions locally with hot reloading and full parity with production.
Dev and Prod parity
Same edge-runtime in development and production — no surprises when you deploy.
name: Deploy Edge Functions
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: supabase/setup-cli@v1
- run: supabase functions deploy --project-ref ${{ secrets.PROJECT_ID }}Continuous Integration
Deploy Edge Functions automatically with GitHub Actions on every push to main.
Use any NPM module
Import from npm, deno.land, or esm.sh — over 1 million modules available.
Run server-side logic
geographically close to your users
Global presence
Edge Functions run in data centers around the world, automatically routing requests to the nearest location for minimum latency.
Automatic scaling
Functions scale automatically with demand. No configuration, no cold-start management, no infrastructure to maintain.
Secure
Functions run in isolated environments with built-in secrets management. Your code and credentials are always protected.
Debug and monitor with
built-in observability
Realtime logs
Stream logs in real-time from the Dashboard or CLI. Debug issues as they happen.
Query Logs
Search and filter logs with the Log Explorer. Find exactly what you need, fast.
Metrics
Monitor invocation counts, execution time, and error rates from the Dashboard.
Integrates with the
Supabase ecosystem
import { createClient } from 'npm:@supabase/supabase-js@2'
Deno.serve(async (req) => {
const supabase = createClient(
Deno.env.get('SUPABASE_URL')!,
Deno.env.get('SUPABASE_ANON_KEY')!,
{ global: { headers: { Authorization: req.headers.get('Authorization')! } } }
)
const { data, error } = await supabase.from('countries').select('*')
if (error) throw error
return new Response(JSON.stringify(data), {
headers: { 'Content-Type': 'application/json' },
})
})Zero configuration
Edge Functions come pre-configured with your Supabase project credentials.
Deploy your first function
in under a minute
Two commands. Global deployment. No infrastructure to manage.
$ supabase functions new hello-world
Created new Function at supabase/functions/hello-world
$ supabase functions deploy hello-world
Deployed Function hello-world on project
https://your-project.supabase.co/functions/v1/hello-world