Refer to the How to create, manage and delete a functions namespace documentation page for more information on the different parameters.
Functions - Quickstart
Scaleway Serverless Functions makes your functions available, executes them on demand and manages resource allocation for you.
Functions are designed for lightweight and short-lived workloads, and are limited to a selection of runtimes for optimum performance.
Refer to the differences between Functions, Jobs, and Containers for more information on Scaleway’s different Serverless products.
This page explains how to deploy, invoke, and delete a basic Node, Python, or PHP function using the Scaleway console.
Before you start
To complete the actions presented below, you must have:
- A Scaleway account logged into the console
- Owner status or IAM permissions allowing you to perform actions in the intended Organization
- Installed cURL
How to create a function
If you have no existing Serverless Functions resources in your current Project, the creation process will guide you through the creation of a namespace, and then a function.
-
Click Functions in the Serverless section of the side menu. The functions page displays.
-
Click + Create a function. The function namespace creation wizard displays.
-
Complete the following steps in the wizard:
- Enter a name or use the automatically generated one. The name can only contain lowercase alphanumeric characters and dashes.
- Enter an optional description.
- Choose a region, which is the geographical location in which your namespace will be deployed.
-
Click Create namespace and add function. The function creation wizard displays.
Note -
Complete the following steps in the wizard:
- Choose either Node, Python or PHP as a runtime.
- Select Deploy “Hello world” if you want to deploy a basic function, or select Inline code editor to enter your own function code.
- If you used the code editor, enter the handler of your function.
- Enter a name or use the automatically generated one. The name can only contain lowercase alphanumeric characters and dashes.
- Enter an optional description.
- Choose the smallest resources available to allocate to your function.
- Leave the default scaling values.
- In the Advanced options, set the Function privacy policy to public.
- Verify the estimated cost.
NoteRefer to the How to create a function documentation page for more information on the different parameters.
-
Click Create function. The deployment takes several minutes to complete. Check the Overview tab to see the function’s status.
How to test a function
-
Click the Test tab of your function.
-
Set the Method to
GET
and the Path to/
. -
Click the Run button to start the test.
The Output section displays the response from your function and the status code.
How to delete a function
-
Click Functions in the Serverless section of the side menu. The functions page displays.
-
Click the relevant functions namespace.
-
Click the «See more Icon» icon next to the function you want to delete, and select Delete from the drop-down menu.
-
Type DELETE in the pop-up that asks you to confirm the action, then click Delete function.
You can also delete a function from the function’s Overview tab.
Going further
If you require more advanced usage, such as large projects with dependencies, automation, and multiple functions, refer to our deployment methods documentation and check our repository for examples and use cases.