Functions Reference

Validated on 23 May 2022 • Last edited on 17 Apr 2025

Functions are blocks of code that run on demand without the need to manage any infrastructure. Develop on your local machine, test your code from the command line (using doctl), then deploy to a production namespace or App Platform — no servers required.

The DigitalOcean API

The DigitalOcean API lets you manage DigitalOcean resources programmatically using conventional HTTP requests. All the functionality available in the DigitalOcean Control Panel is also available through the API.

You can use the API to manage your Functions namespaces.

The DigitalOcean Command Line Client, doctl

doctl supports a command line workflow for developing functions locally and managing their deployment to Functions. See the doctl serverless documentation or use doctl serverless --help for more information.

doctl serverless

The sub-commands of doctl serverless manage local and cloud functions during development and deployment.

Other Reference Material

Activation Record JSON Structure

Each asynchronous activation of a function creates an activation record, which you can retrieve to learn more about the process. Activation records are a JSON object, the structure of which is documented here.

HTTP Headers

HTTP headers used by Functions.

Parameters and Responses

Functions receive two parameters, event and context, and should return a single value.

Project Configuration YAML File

The project.yml file is a YAML configuration file in the root directory of a project which lets you define environment variables, parameters, and other properties for the project and the packages and functions within it.

Supported Runtimes for DigitalOcean Functions

Reference information for supported Functions runtimes.

Build Process

The Functions service performs a build process to transform your project’s source code into executable functions. Though much of the build runs in your own build scripts, there are other details about the Functions build process that are useful to understand and configure.

We can't find any results for your search.

Try using different keywords or simplifying your search terms.