How to create a function
This page shows you how to deploy a function using the Scaleway console.
You may need certain IAM permissions to carry out some actions described on this page. This means:
Click Functions in the Serverless section of the side menu. The functions page displays.
Click the functions namespace in which you want to create your function.
Click + Create function. The function creation wizard displays.
Complete the following steps in the wizard:
- Choose your function’s runtime.
- Select Deploy “Hello world” if you want to deploy a basic function, Inline code editor to enter your own function code, or Upload a ZIP to import a packaged function.
- 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 a description (optional).
- Select the resources to allocate to your function.
- Configure the scaling of your function.
Define a minimum of 1 instance or more to avoid cold starts.
Click + Advanced options and complete the following steps:
- Define any environment variables you want to inject into your function. For each environment variable, click + Add variable and enter the key/value pair.
- Set secret environment variables (optional). Secrets are environment variables which are injected into your function and stored securely, but not displayed in the console after initial validation. Add a key and a value.
- Set the desired timeout for your function.
- Verify the estimated cost.
Click Create function to finish.
There are different ways to deploy Serverless Functions. Refer to our detailed deployment information for more advanced options to deploy your functions.