# Cloud Functions

> **📝 Note**: This is a Preview feature.

SingleStore Cloud Functions is a serverless, cloud-based service that allows users to run code without managing compute resources. It enables the execution of code such as SQL queries, Python scripts, and API calls in response to trigger actions. As a fully managed service, it eliminates the need to provision or manage servers. It allows users to run complex queries and perform ETL (Extract, Transform and Load) tasks without the need to manage dedicated compute resources.

Create and manage cloud functions using the Cloud Portal.

## Publish Cloud Functions using the Cloud Portal

## Create a Cloud Function

Cloud Functions can be created for shared notebooks only.Create a cloud function:

1. **Using Cloud Functions in the left navigation**

   ![Publish a cloud function by navigating to Container Services > Cloud Functions, and select a shared notebook.](https://images.contentstack.io/v3/assets/bltac01ee6daa3a1e14/bltd1294784c70c2dfa/6a2c4275464cc2ddca852efa/Screenshot_2025-11-18_at_2_14_37_PM-RG8oyt.png)

2. **Using Shared Notebooks**

   1. Navigate to **Editor > Shared**.

   2. Select a shared notebook.

   3. Select **Publish** (on the top right).

      ![Select Publish on your shared notebook to publish a cloud function.](https://images.contentstack.io/v3/assets/bltac01ee6daa3a1e14/blt73b69938dd9c52e1/6a2c42ccce0ebe085cfe7c48/Screenshot_2025-11-18_at_2_11_53_PM-dX4cdR.png)

## New Cloud Function

After selecting **Publish**, a new dialog box appears.

![Select Cloud Function in Publish Settings dialog.](https://images.contentstack.io/v3/assets/bltac01ee6daa3a1e14/blt8ec275baf1c743e0/6a2c42cd714c3667db8ec206/publishsettings-hZWQeu.png)

| **Publish Settings** |                                                                                                                                                                                                                                                       |
| -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Publish as**       | Select**Cloud Function**.                                                                                                                                                                                                                             |
| **Name**             | Enter a name for the cloud function.                                                                                                                                                                                                                  |
| **Description**      | Enter the cloud function description.                                                                                                                                                                                                                 |
| **Notebook**         | Select a shared notebook to publish as a cloud function. The shared notebook is pre-selected when the cloud function is published through notebooks.                                                                                                  |
| **Deployment**       | Select theSingleStoredeployment (workspace) the notebook will connect to.Selecting aworkspaceallows connecting to theSingleStoredatabases referenced in the notebook natively. A cloud function can be published without a deployment attached to it. |
| **Runtime**          | Select a runtime from the following:<ul> <li>Small</li> <li>Medium</li> <li>GPU-T4</li> </ul><blockquote> <p><strong>📝 Note</strong>: <p>This field is in preview.</p></p> </blockquote>                                                             |
| **Region**           | Select a region.                                                                                                                                                                                                                                      |
| **Idle Timeout**     | Select an idle timeout.<blockquote> <p><strong>📝 Note</strong>: <p>This field is in preview.</p></p> </blockquote>                                                                                                                                   |

Select **Next**.

![View the summary of the cloud function.](https://images.contentstack.io/v3/assets/bltac01ee6daa3a1e14/bltaf375efafc5eaa63/6a2c43ad03b373cdcb908178/Screenshot_2025-11-27_at_4_16_33_PM-olA0wH.png)

Select **Publish** to publish the notebook as a cloud function.

## Example Notebook

The following notebook shows how to publish your first cloud function:

## Manage an Existing Cloud Function

To view an existing cloud function, select **Cloud Functions** in the left navigation. Existing cloud functions can be managed by performing the following actions:

* View
* Update
* Share
* Delete

## View an Existing Cloud Function

To view an existing cloud function, select the cloud function name under the **Name** column.

![View the cloud function under the Name column](https://images.contentstack.io/v3/assets/bltac01ee6daa3a1e14/blt9d0a3079f7814328/6a2c426c7b02a482196455a5/Screenshot_2025-11-27_at_4_41_26_PM-Ckdhz7.png)

View the following details for each cloud function:

![View the details of a cloud function](https://images.contentstack.io/v3/assets/bltac01ee6daa3a1e14/bltd97d6bfcb6b52e6c/6a2c426ea4b87480c7f6db12/Screenshot_2025-11-27_at_4_39_25_PM-9ic5wW.png)

View the details of a cloud function on the right navigation pane. Following actions can be performed for a cloud function from this page:

* Copy URL
* View API Keys
* View Live Logs
* Share
* Update
* Delete

## View API Keys

Refer to [Container App API Keys](https://docs.singlestore.com/cloud/container-services/container-app-api-keys.md) for related information.

## View Live Logs

To view live logs of the selected cloud function, select **View Live Logs** from the ellipsis on the right side. A new window appears, where the **Timestamp** and the message in the **Body** column can be viewed. View the **Log JSON** by selecting the eye icon.

## Update an Existing Cloud Function

To update an existing cloud function, select the ellipsis in the **Actions** column of the cloud function, and select **Update**.

![Update the cloud function](https://images.contentstack.io/v3/assets/bltac01ee6daa3a1e14/bltae7d3986f41e0db2/6a2c43927b02a41b876455d5/Screenshot_2025-11-27_at_4_44_01_PM-VlkEco.png)

A cloud function can also be updated from a shared notebook.

![Select Update Cloud Function in the notebook in order to update the cloud function.](https://images.contentstack.io/v3/assets/bltac01ee6daa3a1e14/blt8481c21cee8ae15d/6a2c434fddfec52fe96c5601/cfuncupdatenotebook-Munj8M.png)

Select **Update Cloud Function** and select **Update**.

## Share an Existing Cloud Function

To share an existing cloud function, select the ellipsis in the **Actions** column of the cloud function, and select **Share**.

## Delete an Existing Cloud Function

To delete an existing cloud function, select the ellipsis in the **Actions** column of the cloud function, and select **Delete**.

## Status of Cloud Functions

| **Status**   | **Description**                                                                                                                                                                              |
| ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Initializing | The notebook is creating or updating the cloud function.                                                                                                                                     |
| Active       | The notebook is successfully published as a cloud function.                                                                                                                                  |
| Failed       | The cloud function is not configured correctly. View the notebook snapshot to debug the failure.                                                                                             |
| Error        | An error unrelated to the notebook code prevented the cloud function from initializing. Refer to[Troubleshoot Cloud Functions](https://docs.singlestore.com/#section-idm234665756837262.md). |

## Troubleshoot Cloud Functions

SingleStore automatically saves a snapshot of the notebook for each execution that fails. Navigate to **Cloud Functions** in the left navigation, select the cloud function, and download the snapshot associated with the failed cloud function to diagnose the error. The following table lists some common errors and their resolutions:

| **Error**                    | **Solution**                                                                                                |
| ---------------------------- | ----------------------------------------------------------------------------------------------------------- |
| WorkspaceDeleted             | Update the cloud function and select a deployment.                                                          |
| WorkspaceSuspended           | Resume theworkspace, or create a new cloud function with a different deployment.                            |
| Database Detached            | Reattach the database with the right permissions or create a new cloud function with a different database.  |
| Notebook Deleted/Not Present | Create a new cloud function with a different notebook.                                                      |
| Internal Errors/Misc         | Reach out to[SingleStoreSupport](http://support.singlestore.com)or use the chat feature in theCloud Portal. |

***

Modified at: February 24, 2026

Source: [/cloud/container-services/cloud-functions/](https://docs.singlestore.com/cloud/container-services/cloud-functions/)

(An index of the documentation is available at /llms.txt)
