---
title: How to create, manage, and delete a Functions Namespace
description: Step-by-step process for creating, managing, and deleting a Serverless Functions namespace in Scaleway.
tags: functions namespace create manage delete environment variable secret
dates:
  validation: 2025-06-09
  posted: 2021-05-26
---
import Requirements from '@macros/iam/requirements.mdx'


This page shows you how to create, manage, and delete a Functions namespace using the Scaleway console.

[Namespaces](/serverless-functions/concepts/#namespace) allow you to group your [functions](/serverless-functions/concepts/#serverless-functions) and share environment variables, secrets and tokens between them.

<Requirements />

- A Scaleway account logged into the [console](https://console.scaleway.com)
- [Owner](/iam/concepts/#owner) status or [IAM permissions](/iam/concepts/#permission) allowing you to perform actions in the intended Organization

## Creating a Serverless Functions namespace

1. Click **Functions** in the **Serverless** section of the side menu. The functions page displays.

2. Click **+ Create namespace**. If you have no existing Serverless Functions resources in your current Project, click **Create a function**. The functions namespace creation wizard displays.

3. 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** and **tags**.
    - Choose a **region**, which is the geographical location in which your namespace will be deployed.
    - Click **+ Add advanced options** to 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 optional 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**.
4. Click **Create namespace only** to finish, or click **Create namespace and add a function** if you want to [create a function](/serverless-functions/how-to/create-a-function/) next.

<Message type="tip">
Refer to the [dedicated FAQ](/serverless-functions/faq/#how-do-serverless-functions-namespaces-and-container-registry-namespaces-interact) for more information on how Serverless Functions namespaces and Container Registry namespaces interact.
</Message>

## Managing a Serverless Functions namespace

### Generating and managing access tokens

1. [Create an IAM application](/iam/how-to/create-application/) that will be used as a principal for the policy granting access to your private function.

2. [Create an API key](/iam/how-to/create-api-keys/) for your application. Store the secret key securely, as it is only shown once.

3. [Create an IAM policy](/iam/how-to/create-policy/) with the following elements:
  - **Scope**: the desired Project(s)
  - **Principal**: the application you just created
  - **Permission set**:  `FunctionsPrivateAccess`

You can now [use your private key as a token](#using-tokens) to call private functions.

Private functions present in your namespace now require the authentication token to be executed, as shown below:
```curl
  curl -H "X-Auth-Token: <YOUR_FUNCTION_TOKEN>" <YOUR_FUNCTION_ENDPOINT>
```

### Managing environment variables and secrets

The Scaleway console allows you to define environment variables and secrets at the namespace-level to pass to the functions present in the namespace.

1. Click **Functions** in the **Serverless** section of the side menu. The functions page displays.

2. Click the functions namespace you want to manage.

3. Click the **Namespace settings** tab. Information about the region, registry endpoint and description of your namespace display.

4. Add any additional environment variables by clicking the <Icon name="edit" /> icon, **+ Add variable**, entering the key/value pair, and clicking <Icon name="validate"/>.

5. Add any additional secrets by clicking the <Icon name="edit" /> icon, **+ Add secret**, entering the key/value pair, and clicking <Icon name="validate"/>.

The environment variables and secrets defined will now be passed to your functions. Every function in a **ready** state is redeployed to take the change into account.

## Deleting a Serverless Functions namespace

1. Click **Functions** in the **Serverless** section of the side menu. The functions page displays.

2. Click the <Icon name="more" /> icon next to the namespace you want to delete, and select **Delete** from the drop-down menu.

3. Type **DELETE** in the pop-up that asks you to confirm the action, then click **Delete namespace**.

<Message type="tip">
  You can also delete a namespace from the **Namespace settings** tab.
</Message>
