You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: faq/serverless-functions.mdx
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -173,7 +173,7 @@ Refer to our dedicated page about [Serverless Functions limitations and configur
173
173
174
174
Serverless Functions enables you to deploy functions using popular languages: `Go`, `Node`, `Python`, `PHP`, and `Rust`.
175
175
176
-
Refer to our dedicated page about [Serverless Functions Runtimes Lifecycle](/serverless-functions/reference-content/functions-lifecycle/)
176
+
Refer to our dedicated page about [Serverless Functions Runtimes Lifecycle](/serverless-functions/reference-content/functions-runtimes/)
177
177
178
178
### Why does my function have an instance running after deployment, even with min-scale 0?
179
179
@@ -210,7 +210,7 @@ Check out our [serverless-examples repository](https://github.com/scaleway/serve
210
210
### How to migrate runtimes?
211
211
212
212
There are no constraints when changing a function runtime, you simply need to choose the runtime version you want.
213
-
Upgrading a runtime is highly recommended in case of deprecation, and for runtimes that have reached end-of-support or end-of-life. See the [functions runtimes lifecycle documentation](/serverless-functions/reference-content/functions-lifecycle/) for more information.
213
+
Upgrading a runtime is highly recommended in case of deprecation, and for runtimes that have reached end-of-support or end-of-life. See the [functions runtimes lifecycle documentation](/serverless-functions/reference-content/functions-runtimes/) for more information.
Serverless Functions can only be written in languages [available as runtimes](/serverless-functions/reference-content/functions-lifecycle/#available-runtimes).
61
+
Serverless Functions can only be written in languages [available as runtimes](/serverless-functions/reference-content/functions-runtimes/#available-runtimes).
Copy file name to clipboardExpand all lines: pages/serverless-functions/api-cli/deploy-function-cli.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -76,7 +76,7 @@ categories:
76
76
```
77
77
78
78
<Messagetype="tip">
79
-
Refer to [this page](/serverless-functions/reference-content/functions-lifecycle/#available-runtimes) to see all the available runtimes.
79
+
Refer to [this page](/serverless-functions/reference-content/functions-runtimes/#available-runtimes) to see all the available runtimes.
80
80
</Message>
81
81
82
82
3. Create a zip file containing your function's code by following [this procedure](/serverless-functions/how-to/package-function-dependencies-in-zip/).
Copy file name to clipboardExpand all lines: pages/serverless-functions/how-to/create-a-function.mdx
+55-24Lines changed: 55 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,13 @@
1
1
---
2
2
meta:
3
-
title: How to create a function
3
+
title: How to create a function using the Scaleway console
4
4
description: Create your first serverless function on Scaleway with this comprehensive guide.
5
5
content:
6
-
h1: How to create a function
6
+
h1: How to create a function using the Scaleway console
7
7
paragraph: Create your first serverless function on Scaleway with this comprehensive guide.
8
8
tags: functions
9
9
dates:
10
-
validation: 2024-07-23
10
+
validation: 2025-01-29
11
11
posted: 2021-05-26
12
12
categories:
13
13
- serverless
@@ -21,39 +21,70 @@ This page shows you how to deploy a [function](/serverless-functions/concepts/#f
21
21
-[Owner](/iam/concepts/#owner) status or [IAM permissions](/iam/concepts/#permission) allowing you to perform actions in the intended Organization
22
22
- A [functions namespace](/serverless-functions/how-to/create-manage-delete-functions-namespace/)
23
23
24
+
## How to create a function
25
+
24
26
1. Click **Functions** in the **Serverless** section of the side menu. The functions page displays.
25
27
26
28
2. Click the functions namespace in which you want to create your function.
27
29
28
30
3. Click **+ Create function**. The function creation wizard displays.
29
31
30
-
4. Complete the following steps in the wizard:
31
-
- Choose your function's runtime.
32
-
- Select **Deploy "Hello world"** to deploy a basic function, **Inline code editor** to enter your own function code, or **Upload a ZIP** to import a [packaged function](/serverless-functions/how-to/package-function-dependencies-in-zip/).
33
-
- If you used the code editor, enter the [handler](/serverless-functions/reference-content/functions-handlers/) of your function.
34
-
- Enter a **name** or use the automatically generated one. The name can only contain lowercase alphanumeric characters and dashes.
35
-
- Enter an optional **description**.
36
-
- Select the **resources** to allocate to your function.
37
-
- Configure the **scaling** of your function.
32
+
### Function configuration
33
+
34
+
1. Select a runtime for your function. For more information on runtimes configuration and lifecycle, refer to the [dedicated documentation](/serverless/functions/reference-content/functions-runtimes/).
35
+
36
+
2. Select a function code option:
37
+
38
+
-**Inline code editor** to enter your own function code.
39
+
40
+
-**Deploy "Hello world"** to deploy a basic function that will return "Hello world" when invoked. This option allows you to quickly test a deployment.
41
+
42
+
-**Upload a ZIP** to import a [packaged function](/serverless-functions/how-to/package-function-dependencies-in-zip/).
43
+
44
+
3. If you used the code editor, enter the [handler](/serverless-functions/reference-content/functions-handlers/) of your function.
45
+
46
+
4. Enter a **name** or use the automatically generated one. The name can only contain lowercase alphanumeric characters and dashes. You can click the icon at the right to generate a random name for your function.
47
+
48
+
5. Enter an optional **description** for your function.
49
+
50
+
### Function resources and scaling
51
+
52
+
1. Select the **resources** to allocate to your function.
53
+
54
+
2. Configure the **scaling** of your function.
38
55
<Messagetype="tip">
39
-
Define a minimum of **one instance** or more to avoid cold starts.
56
+
Define a minimum of **one instance** or more to avoid [cold starts](/serverless/functions/concepts/#cold-start).
40
57
</Message>
41
-
5. Click **+ Advanced options** and complete the following steps:
42
-
- Define any **environment variables** you want to inject into your function. For each environment variable, click **+ Add variable** and enter the key/value pair.
43
-
- Optionally, set secret environment variables. **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**.
44
-
<Messagetype="note">
45
-
Encode your environment variables and secrets to `base64` if they are too large, and contain carriage returns.
46
-
</Message>
47
-
- Set the desired **privacy policy** for your function. This defines whether a function can be executed anonymously (**public**) or only via an authentication mechanism provided by the [Scaleway API](https://www.scaleway.com/en/developers/api/serverless-functions/#authentication) (**private**).
48
-
- Set the desired timeout for your function.
58
+
59
+
### Function advanced options (optional)
60
+
61
+
1. Click **+ Advanced options**.
62
+
63
+
2. Define any **environment variables** you want to inject into your function. For each environment variable, click **+ Add variable** and enter the key/value pair.
64
+
65
+
3. Define any **Secrets** you want to inject into your function. For each secret, click **+ Add secret** and enter the key/value pair. Secrets are environment variables which are injected into your function and stored securely, but not displayed in the console after initial validation.
66
+
67
+
<Messagetype="note">
68
+
Encode your environment variables and secrets to `base64` if they are too large, and contain carriage returns.
69
+
</Message>
70
+
71
+
4. Set the desired **privacy policy** for your function. This defines whether a function can be executed anonymously (**public**) or only via an authentication mechanism provided by the [Scaleway API](https://www.scaleway.com/en/developers/api/serverless-functions/#authentication) (**private**).
72
+
73
+
5. Set the desired timeout for your function.
74
+
75
+
6. Choose the desired **Sandbox** environment for your function.
49
76
<Messagetype="note">
50
77
[Triggers](/serverless-functions/concepts/#trigger) can no longer be added from this screen. For more information, refer to the [How to add a trigger to a function](/serverless-functions/how-to/add-trigger-to-a-function/) documentation.
51
78
</Message>
52
-
- Verify the **estimated cost**.
53
-
6. Click **Create function** to finish.
79
+
80
+
### Function cost and validation
81
+
82
+
1. Update the **Number of requests** and **Average request duration** fields to simulate the behavior of your function.
83
+
84
+
2. Verify the **estimated cost**. Refer to the [Serverless Functions pricing](/faq/serverless-functions/#how-am-i-billed-for-serverless-functions) for more information on how billing works.
85
+
86
+
3. Click **Create function** to finish.
54
87
55
88
<Messagetype="tip">
56
89
There are different ways to deploy Serverless Functions. Refer to our detailed [deployment information](/serverless-functions/reference-content/deploy-function/) for more advanced options to deploy your functions.
0 commit comments