Appwrite icon

Appwrite

Interact with Appwrite API

Actions181

Functions → Create Deployment

AI-generated

Overview

This node interacts with the Appwrite API to create a deployment for a specified function. It uploads a code archive (tar.gz) as a deployment, optionally specifying an entrypoint file and whether to activate the deployment automatically. This is useful for developers managing serverless functions in Appwrite, allowing them to deploy new versions of their functions programmatically within an automation workflow.

Use Case Examples

  1. Deploy a new version of a serverless function by uploading a tar.gz archive containing the function code.
  2. Automatically activate the deployment upon creation to make the new function version live immediately.
  3. Specify a custom entrypoint file for the deployment if different from the default function entrypoint.

Properties

Name Meaning
Function ID The ID of the function to which the deployment belongs, required to identify the target function.
Deployment ID The ID of the deployment, which can be generated uniquely using unique().
Entrypoint Optional entrypoint file for the deployment; if not specified, the function's default entrypoint is used.
Input Binary Field Name of the input binary field containing the code archive (tar.gz) to be deployed, required to upload the function code.
Activate Option to automatically activate the deployment upon creation, making it live immediately.

Output

JSON

  • deploymentId - The unique identifier of the created deployment.
  • functionId - The ID of the function associated with the deployment.
  • entrypoint - The entrypoint file used for the deployment.
  • activated - Boolean indicating whether the deployment is activated.
  • status - The status of the deployment creation process.

Dependencies

  • Appwrite API key credential for authentication

Troubleshooting

  • Ensure the binary input field contains a valid tar.gz archive; otherwise, the deployment will fail.
  • Verify that the Function ID is correct and exists in the Appwrite project to avoid errors.
  • If the deployment ID is not unique, the operation may fail or overwrite an existing deployment.
  • Check API key permissions to ensure the node can create deployments in the Appwrite project.

Links

Discussion