Functions & Agents

Run your code everywhere, on demand

Deploy Node.js, Python or Ruby from source and get one endpoint that answers from the closest region, with the caller's verified identity already on the event.

Functions & Agents product screenshot
functions
volcano cloud functions deploy --allScanning volcano/functions/...Found 3 function(s)✓ 3/3 functions deployment startedvolcano cloud functions invoke summarize --payload '{"id":42}'200  {"summary":"…"}  · 412 msvolcano cloud functions logs summarize --type runtime --follow# same endpoint answers from whichever region is closest
Overview

The handler is the easy part

Getting a handler to production usually means an image, a registry, a cluster, an autoscaler, a load balancer, a certificate and somewhere to keep the secrets — none of which is the feature you set out to write.

Here you deploy source. Volcano detects the runtime, installs your dependencies, distributes the function to every region, and answers on one endpoint that sends each caller to the closest copy. Secrets arrive as environment variables, logs stream to your terminal, and a cron expression is all a scheduled run needs.

Identity

The caller arrives already verified

Invoke with a user's access token and Volcano validates it, then puts the result on the event as __volcano_auth. Your handler reads a user id, not a JWT.

  • user_id, email, role and project_id on the event
  • Their access token too, so one function can call another as them
  • Anon key reaches public functions only
event.__volcano_auth
{  user_id:      '8f1c4b0e-…',  email:        'ada@acme.com',  role:         'authenticated',  project_id:   '…',  access_token: 'eyJhbGciOi…'}signature already checked before your code ran
Reach

One endpoint, answered from the closest region

Every function gets an HTTPS endpoint deployed to every region Volcano runs in, and a request is answered by the closest one. You publish a single URL and the routing happens for you.

  • One URL, no region in the path
  • Regions across North America, Europe, Asia-Pacific and South America
  • Pin a project to a subset of regions when you need to
us-westOregon, USA
us-eastN. Virginia, USA
eu-westDublin, Ireland
eu-centralFrankfurt, Germany
sa-eastSão Paulo, Brazil
ap-northeastTokyo, Japan
ap-southeastSingapore
ap-southeast-2Sydney, Australia
CoverageNearFar
one endpoint · answered from the closest region
Operations

Live logs and cron, built in

Build and runtime logs are queryable per function and can be followed live from the CLI. Recurring work is a cron expression attached to a function you already deployed.

  • volcano cloud functions logs --type build|runtime --follow
  • Five-field UTC cron, down to once a minute
  • Scheduled runs arrive with __volcano_schedule on the event
volcano cloud functions logs summarize --type runtime -f
12:04:01  [us-east-1]  start  request 4c1e…12:04:01  [us-east-1]  fetched 128 rows12:04:02  [us-east-1]  done in 940 ms12:05:00  [eu-west-1]  start  scheduled runfollowing · ctrl-c to stop
Capabilities

What you get with every function

Node, Python and Ruby

Node.js 22 and 24, Python 3.10 through 3.14, Ruby 3.3, 3.4 and 4.0. The runtime is detected from the file.

Long-running work

Up to 30 seconds per invocation on Hobby or 180 seconds on Superagent, with a writable /tmp. Past that, a durable function runs for up to a year.

Deployed to every region

One HTTPS endpoint per function, answered by the closest region that has a copy.

Verified caller identity

Tokens are validated before your handler runs and arrive on the event as __volcano_auth.

Cron schedulers

Attach a five-field UTC schedule to a function, from once a minute to once a month.

Build and runtime logs

Query by function and deployment, or follow them live while you reproduce a bug.

Code

Write it, ship it, schedule it

JavaScript
const { Client } = require('pg'); const { databaseConnectionString } = require('@volcano.dev/sdk'); exports.handler = async (event) => { const auth = event.__volcano_auth; if (!auth) { return { statusCode: 401, body: JSON.stringify({ error: 'sign in required' }) }; } // Connect as the caller so row-level security applies to this query the // same way it would from the browser. Omit userId for admin access. const db = new Client({ connectionString: databaseConnectionString(process.env.DATABASE_URL, { userId: auth.user_id, }), }); await db.connect(); try { const { rows } = await db.query( 'select title, body from notes where id = $1', [event.id], ); if (rows.length === 0) { return { statusCode: 404, body: JSON.stringify({ error: 'not found' }) }; } return { statusCode: 200, body: JSON.stringify({ summary: summarize(rows[0]) }) }; } finally { await db.end(); } };
Use cases

What people run on them

volcano.dev/dashboard/edge-function
Deployed functions with their runtime and visibility
Platform

Works with the rest of Volcano

Databases and vector
  • Query as the user

    Store the connection string as the DATABASE_URL project variable and connect as the caller, so their own policies apply.

Authentication
  • Sessions already verified

    Tokens are validated before your handler runs, so there is no verification code to get wrong.

File storage
  • Read and write buckets

    Work with storage from a function, or hand the browser a direct upload instead.

Durable functions
  • Work that outlives a request

    Move multi-step jobs into a durable function that checkpoints each step and resumes after a failure or a wait.

Frequently asked questions

Read the docs
Which languages and versions can I use?

Node.js 22 and 24, Python 3.10 through 3.14, and Ruby 3.3, 3.4 and 4.0. The runtime is picked from the entrypoint file, and volcano cloud functions runtimes prints the current list.

How long can a function run?

Up to 30 seconds per invocation on Hobby or 180 seconds on Superagent, with a writable /tmp for whatever the run produces. Work that takes longer, or has to wait for something, belongs in a durable function: it checkpoints each step and can run for up to a year.

Where do functions run?

In every region Volcano operates, spanning North America, Europe, Asia-Pacific and South America. Each function has one hostname, and Volcano answers each request from the closest region.

How do I keep API keys out of my code?

Put them in volcano/volcano.env and run volcano cloud variables deploy. They are injected as environment variables at runtime and never travel in the source archive.

Can a function run on a schedule?

Yes, with a standard five-field UTC cron expression, as often as once a minute. A scheduled run arrives with __volcano_schedule on the event, so one handler can serve both requests and cron.

What stops two overlapping runs doing the same work twice?

A project lock. From a function holding a service key, wrap the work in volcano.locks.withLock('nightly-digest', { ttl: 60 }, run). One run gets the lease and keeps it renewed, and every other run gets acquired: false and skips. For a queue of rows, claim them in Postgres with FOR UPDATE SKIP LOCKED instead.

Ready to deploy your first function?

Build, deploy, and scale on Volcano's global platform — free to start, with no infrastructure to manage.

Checkout more features