---
title: How to use Private Networks with your Serverless Functions
description: This page explains how to use Private Networks for Scaleway Serverless Functions
tags: private-networks private networks instance functions vpc
dates:
  validation: 2025-06-25
  posted: 2021-06-25
---
import Requirements from '@macros/iam/requirements.mdx'
import VPCRoutingCompatibility from '@macros/vpc/vpc-routing-compatibility.mdx'

[Private Networks](/serverless-functions/concepts/#private-networks) allow your Serverless Functions to communicate in an isolated and secure network without needing to be connected to the public internet. Each function can be connected to one or several Private Networks, letting you build your own network topologies.

For full information about Scaleway Private Networks and VPC, see our [dedicated documentation](/vpc/) and [best practice guide](/vpc/reference-content/getting-most-private-networks/).

<VPCRoutingCompatibility />

<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
- [Created a Private Network](/vpc/how-to/create-private-network/)

## How to create a Private Network

This action must be carried out from the Private Networks section of the console. Follow the procedure detailed in our [dedicated Private Networks documentation](/vpc/how-to/create-private-network/).

## How to attach a Serverless Function to a Private Network

<Tabs>
  <TabsTab label="Existing function">
  1. Click **Functions** in the **Serverless** section of the side menu. The functions page displays.
  2. Click the relevant functions namespace.
  3. Click the name of the function you want to manage.
  4. Open the **Settings** tab, then scroll to the **Advanced options** section.
  5. In the **Private Networks** tab, select a Private Network from the dropdown menu.
  6. Click **Save function settings**.

  Your function is redeployed, and is now attached to the selected Private Network.
</TabsTab>
<TabsTab label="New function">
  1. Click **Functions** in the **Serverless** section of the side menu. The functions page displays.
  2. Click the **functions namespace** in which you want to create your function.
  3. Click **+ Create function**. The function creation wizard displays.
  4. Scroll to the **Advanced options** section.
  5. In the **Private Networks** tab, select a Private Network from the dropdown menu.
  6. Configure the other parameters of your function, then click **Create function**. Refer to the [How to create a function](/serverless-functions/how-to/create-a-function/) for more information.

  Your new function is deployed, and is attached to the selected Private Network.
  </TabsTab>
</Tabs>

## How to detach a function from a Private Network

1. Click **Functions** in the **Serverless** section of the side menu. The functions page displays.
2. Click the relevant functions namespace.
3. Click the name of the function you want to manage.
4. Open the **Settings** tab, then scroll to the **Advanced options** section.
5. In the **Private Networks** tab, click the <Icon name="unlink" /> icon next to the Private Network attached to your function.
6. Click **Save function settings**.

Your function is redeployed and is now detached from the Private Network.

## How to delete a Private Network

<Message type="note">
  Before deleting a Private Network, you must [detach](/vpc/how-to/attach-resources-to-pn/#how-to-detach-a-resource-from-a-private-network) all resources attached to it.
</Message>

This must be carried out from the Private Networks section of the console. Follow the procedure detailed in our [dedicated Private Networks documentation](/vpc/how-to/delete-private-network/).

## Private Networks and functions limitations

For more information on limitations when using Private Networks with Serverless Functions, refer to the [dedicated documentation](/serverless-functions/reference-content/functions-private-networks/).