Skip to content

What you can build

View as Markdown

Functions suits jobs that start from an HTTP request and answer quickly. You write a function, E2E builds and runs it, and you call it over its public HTTPS URL. When many requests arrive at once, the function scales out to handle them. See Runtimes and hardware for the full runtime list.

Build REST APIs and backend endpoints without managing application servers. Each API gets its own function and its own URL.

To receive webhooks, give the sending service the function’s URL as its webhook address. The function runs each time an event arrives. Payment callbacks, Git events, and CRM and CI/CD hooks all work this way.

Run a small backend that gathers data for a web or mobile app, as a function the app calls.

Run each service of an application as its own function. Each service scales with its own traffic.

Run data processing jobs on demand, such as CSV processing and ETL jobs. Each call can run for up to 600 seconds, the highest Timeout (sec). Split a longer job into calls that each finish within that time.

Serve a small model, or call a hosted LLM API, from a function. Python 3.11 (FastAPI) and Custom Container Image suit it. To serve a large model on a GPU, use TIR.

Run an AI agent or an automated job as a function that you call over its URL.

Use Custom Container Image to bring an application you already run in a container. The container must be built for linux/amd64, run as a non-root user, and listen on port 8080 or the port you set. See Deploy a custom container image.

The runtimes that suit each kind of job:

Job Runtimes
API services, including a new REST API Python 3.11 (FastAPI), a Python (Http) runtime, or a Node (Http) runtime such as Node 24.x (Http)
Webhooks A Python (Http) runtime or a Node (Http) runtime
Backend for a frontend Python 3.11 (FastAPI) or a Node (Http) runtime
Microservices Python 3.11 (FastAPI), a Node (Http) runtime, or Go 1.21 (Http)
Lightweight AI inference Python 3.11 (FastAPI) or Custom Container Image
AI agents and automation Python 3.11 (FastAPI) or Custom Container Image
Data processing A Python (Http) runtime or Python 3.11 (FastAPI)
An application already in a container Custom Container Image
Code written in C# C# .Net 7.0 (Http)
Code written in PHP PHP 8.2 (Http)

For how to choose between the Python and Node.js runtimes, see Runtimes and hardware.

A function runs when an HTTP request calls it. To run code on a schedule, use a scheduler, such as cron on a node, to call the function’s URL.

Example: image processing with E2E Object Storage

Section titled “Example: image processing with E2E Object Storage”

You can use a function to improve images before you store or publish them, for example by adjusting contrast or resizing. Combine the function with E2E Object Storage to process images stored in a bucket.

What you need before you start:

  • An Object Storage bucket to read images from and write results to.
  • The bucket’s name and the access credentials the function uses to connect to it.

The function connects to the bucket and reads an image from it. It opens the image with an image library such as Pillow, raises the image’s contrast, and writes the result back to the bucket. To use Pillow, add it to requirements.txt. Keep settings such as the bucket’s name out of your code. See Use environment variables for how a function reads its settings.

Put a runtime choice to work in Create a function. For how a handler receives a request and returns a response, see Requests and responses.