For the complete documentation index, see llms.txt. This page is also available as Markdown.

Create a custom function

The Add New Function form — it opens, but Save does not create a function.

Where: Code → Functions → Add New · /projects/<project>/code/functions/custom/new

Before you start

Steps

  1. On Code Functions, press Add New. Add New Function opens with two Options: AWS SAM CLI and Manual upload.

    Add New Function with the options AWS SAM CLI and Manual upload
    Add New Function.
  2. AWS SAM CLI shows a guide, not a form: a sam init line per language (NodeJs, NodeJs + TS, Python, .NET, Go, Ruby, Java), a template.yaml and a samconfig.toml filled with the project id, then sam build and sam deploy. The starter repositories it names belong to the old product, and the box at the top talks about file integrations — it is old text.

    The AWS SAM CLI option: an old box about file integrations, then Create function with language tabs and a sam init line, template.yaml and samconfig.toml
    The AWS SAM CLI guide.
  3. Manual upload shows the form:

    Field
    Required
    What it does
    Example

    Cloud provider

    yes

    The provider integration to deploy to (shown when one is connected).

    Bookshop Lambda

    Runtime

    yes

    An AWS Lambda runtime; Include previous generation runtimes lists older ones too.

    nodejs20.x

    Handler

    yes

    The entry point of the code.

    index.handler

    Memory in MB

    yes

    Memory of the function.

    128

    Timeout in minutes / seconds

    yes

    How long one run may take.

    0 / 15

    Environment variables

    no

    Key–value pairs for the function (+ Add Variable).

    STAGE = production

    Code package

    yes

    A .zip file, at most 10 MB (Download gives a NodeJS 20.x starter).

    find-books.zip

    Impersonate Service Account

    no

    Run the function as a service user.

    —

    Display name

    no

    The name in the list.

    Find books

    Function description

    no

    A note for your team.

    Lists the books in the shop

    Tags

    no

    Free labels.

    books

    The Manual upload form: Runtime, Handler, Memory, Timeout, Environment variables, the zip upload, Impersonate Service Account, Display name, Function description and Tags
    The Manual upload form.
  4. Press Save. Cloud checks the required fields, but its save call is a placeholder that sends nothing to the server, so no function is created.

Result

No function is saved. The Code Functions list stays empty.

Change or remove it later

Do it from code

There is no endpoint for standalone functions. The nearest thing that works is adding a marketplace function to an installed connection (the connection id comes from Enable a connection):

API: Save Marketplace Function

Last updated

Was this helpful?