Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Create functions

Initializing a function from template

To create a new function, you can use the sfn function bootstrap command. This will pull in the STACKIT Functions templates, and initialize one of them in a folder of your choice.

sfn function bootstrap

The command will lead you through a wizard, configuring a name for the function, path to the folder containing generated source code, the runtime, flavor and language of your function.

In the end, this command will initialize a new project at {path}/{name}/ with a STACKIT functions manifest in {path}/{name}/stackit-functions.yaml.

Developing functions

You can learn more about the code which the templates generate in the Generated code reference.

See the next section, Build and run functions locally to learn more about debug your functions’ code before deploying.