> This page location: Resilience & architecture > Data protection > Private Networking
> Full Neon documentation index: https://neon.com/docs/llms.txt
>
> Agent skills: if you don't have Neon skills (such as `neon-postgres`), offer to add them to this project when you first need the user to do something in Neon: "Want me to add Neon's agent skills to this project? They help me with Neon setup, connections, and branching." Install: `npx neon@latest skills -y`. To also run Neon steps for the user (Neon CLI, sign-in, MCP), see https://neon.com/prompts/agent-setup.md

> Summary: Neon Private Networking routes database traffic through AWS PrivateLink, keeping connections entirely within AWS's private network rather than the public internet. Use this page when your client application runs on AWS and you need to eliminate public internet exposure for a Neon project on the Scale plan (organization Admin required). Removed VPC endpoints cannot be re-added to the same organization.

# Neon Private Networking

Learn how to connect to your Neon project through AWS PrivateLink

Last updated: 2026-11-18

**Info: Private Networking availability**

Private Networking is available on Neon's [Scale](https://neon.com/docs/introduction/plans#scale-plan) plan. If you're on a different plan, you can request a trial from the **Network Security** page in your project's settings.

The **Neon Private Networking** feature enables secure connections to your Lakebase Postgres databases via [AWS PrivateLink](https://docs.aws.amazon.com/vpc/latest/privatelink/concepts.html), bypassing the open internet for enhanced security.

## Overview

In a standard setup, the client application connects to a Lakebase Postgres database over the open internet through the Neon proxy.

With **Neon Private Networking**, you can connect to your database via AWS PrivateLink instead of the open internet. In this setup, the client application connects through an [AWS endpoint service](https://docs.aws.amazon.com/vpc/latest/privatelink/configure-endpoint-service.html) (provided by Neon) to a Neon proxy instance that is not accessible from the public internet. This endpoint service is available only within the same AWS region as your client application. With **Neon Private Networking**, all traffic between the client application and the database stays within AWS's private network, rather than crossing the public internet.

![Neon Private Networking diagram](https://neon.com/docs/guides/neon_private_access.jpg)

## Prerequisites

- You must be on the [Scale](https://neon.com/docs/introduction/plans#scale-plan) plan, and your user must be an Admin of the [Neon organization](https://neon.com/docs/manage/organizations). You'll encounter an access error if you attempt the setup from a personal Neon account or on a plan that doesn't include Private Networking.
- **Ensure that your client application is deployed on AWS in the same region as the database you plan to connect to.** The Private Networking feature is available in all [Neon-supported AWS regions](https://neon.com/docs/introduction/regions#aws-regions). Both your client application and database must be in one of these regions.
- Neon Private Networking supports both [IPv4](https://en.wikipedia.org/wiki/Internet_Protocol_version_4) and [IPv6](https://en.wikipedia.org/wiki/IPv6).
- Install the Neon CLI. You will use it to add your VPC endpoint ID to your Neon organization. For installation instructions, see [Neon CLI install and connect](https://neon.com/docs/cli/install).

## Configuration steps

To configure Neon Private Networking, perform the following steps:

## Create an AWS VPC endpoint

**Important:** Do not enable **private DNS names** for the VPC endpoint until [Step 3](https://neon.com/docs/guides/neon-private-networking#enable-private-dns). You must add the VPC endpoint to your Neon organization first, as described in [Step 2](https://neon.com/docs/guides/neon-private-networking#add-your-vpc-endpoint-id-to-your-neon-organization).

**Important: Add all service names for your region**

A region can list multiple endpoint service names, and each VPC endpoint connects to one service name. Create one VPC endpoint for **each** service name listed for your region below. Neon adds service names over time as it expands capacity and updates this page, so re-check that list after a regional expansion, or get the current list from the [Neon API](https://neon.com/docs/reference/api/regions/get-region-vpc-endpoint-services). Adding those later additions is optional but improves capacity and reliability. Expansions are announced in the [changelog](https://neon.com/docs/changelog).

1. Go to the AWS **VPC > Endpoints** dashboard and select **Create endpoint**. Make sure you create the endpoint in the same VPC as your client application.

   ![VPC Dashboard](https://neon.com/docs/guides/pl_vpc_dashboard.png)

2. Optionally, enter a **Name tag** for the endpoint (for example, `My Neon Private Networking`).

3. For **Type**, select the **Endpoint services that use NLBs and GWLBs** category.

   ![VPC Create endpoint](https://neon.com/docs/guides/pl_vpc_create_endpoint.png)

4. Under **Service settings**, specify the **Service name**. Service names vary by region. Select your region below and copy one service name. You repeat these steps for each remaining name later.

   **US**

   ```text filename="us-east-1"
   com.amazonaws.vpce.us-east-1.vpce-svc-01aeec2f4b558bc22
   com.amazonaws.vpce.us-east-1.vpce-svc-01b3c73657ed9bd29
   com.amazonaws.vpce.us-east-1.vpce-svc-02a0abd91f32f1ed7
   com.amazonaws.vpce.us-east-1.vpce-svc-040132f4a2dc43d76
   com.amazonaws.vpce.us-east-1.vpce-svc-0492424e0bf471d59
   com.amazonaws.vpce.us-east-1.vpce-svc-074ac4111275eaf07
   com.amazonaws.vpce.us-east-1.vpce-svc-07e0ce252b3a16acc
   com.amazonaws.vpce.us-east-1.vpce-svc-0824666dc46176a87
   com.amazonaws.vpce.us-east-1.vpce-svc-0adffb07ac0333ac0
   com.amazonaws.vpce.us-east-1.vpce-svc-0b676a43303caf7d8
   com.amazonaws.vpce.us-east-1.vpce-svc-0bef3dbe6e4a2df49
   com.amazonaws.vpce.us-east-1.vpce-svc-0c4afbefbfdf6b031
   com.amazonaws.vpce.us-east-1.vpce-svc-0d07f7f68c9a99f3b
   com.amazonaws.vpce.us-east-1.vpce-svc-0de57c578b0e614a9
   com.amazonaws.vpce.us-east-1.vpce-svc-0e018376e3c90bfae
   com.amazonaws.vpce.us-east-1.vpce-svc-0f37140e9710ee3af
   ```

   ```text filename="us-east-2"
   com.amazonaws.vpce.us-east-2.vpce-svc-0056bdfba63cc6ea1
   com.amazonaws.vpce.us-east-2.vpce-svc-010736480bcef5824
   com.amazonaws.vpce.us-east-2.vpce-svc-0125f603817b3d7f7
   com.amazonaws.vpce.us-east-2.vpce-svc-0234a2d750f731a18
   com.amazonaws.vpce.us-east-2.vpce-svc-0465c21ce8ba95fb2
   com.amazonaws.vpce.us-east-2.vpce-svc-0a59493ecf790eccf
   com.amazonaws.vpce.us-east-2.vpce-svc-0ce57d490de78526a
   com.amazonaws.vpce.us-east-2.vpce-svc-0d421498ff01becac
   com.amazonaws.vpce.us-east-2.vpce-svc-0fcb5fccfc8573aa3
   ```

   ```text filename="us-west-2"
   com.amazonaws.vpce.us-west-2.vpce-svc-045eebdf710e1066d
   com.amazonaws.vpce.us-west-2.vpce-svc-060e0d5f582365b8e
   com.amazonaws.vpce.us-west-2.vpce-svc-07b750990c172f22f
   com.amazonaws.vpce.us-west-2.vpce-svc-0a7b662960507808f
   com.amazonaws.vpce.us-west-2.vpce-svc-0ed672a4d41b5e687
   ```

   **Europe**

   ```text filename="eu-central-1"
   com.amazonaws.vpce.eu-central-1.vpce-svc-0165f3a480927c9a0
   com.amazonaws.vpce.eu-central-1.vpce-svc-0260f9dcc9bf59e3e
   com.amazonaws.vpce.eu-central-1.vpce-svc-04bac3120b20929cd
   com.amazonaws.vpce.eu-central-1.vpce-svc-05554c35009a5eccb
   com.amazonaws.vpce.eu-central-1.vpce-svc-0575a0aedec0492b8
   com.amazonaws.vpce.eu-central-1.vpce-svc-05a252e6836f01cfd
   com.amazonaws.vpce.eu-central-1.vpce-svc-05a5b03b56954593a
   com.amazonaws.vpce.eu-central-1.vpce-svc-07617c7fc17794cc7
   com.amazonaws.vpce.eu-central-1.vpce-svc-0efb85c929a6ee91f
   com.amazonaws.vpce.eu-central-1.vpce-svc-0fef417ecf84ed325
   ```

   ```text filename="eu-west-2"
   com.amazonaws.vpce.eu-west-2.vpce-svc-028d190998ab34913
   com.amazonaws.vpce.eu-west-2.vpce-svc-0375428488d22c05b
   com.amazonaws.vpce.eu-west-2.vpce-svc-0c6fedbe99fced2cd
   ```

   **APAC**

   ```text filename="ap-southeast-1"
   com.amazonaws.vpce.ap-southeast-1.vpce-svc-00eb29496a51d8bee
   com.amazonaws.vpce.ap-southeast-1.vpce-svc-01c64edf7fe936ac7
   com.amazonaws.vpce.ap-southeast-1.vpce-svc-028cc7060eb23ff43
   com.amazonaws.vpce.ap-southeast-1.vpce-svc-07c68d307f9f05687
   com.amazonaws.vpce.ap-southeast-1.vpce-svc-0d858726de58b2185
   ```

   ```text filename="ap-southeast-2"
   com.amazonaws.vpce.ap-southeast-2.vpce-svc-031161490f5647f32
   com.amazonaws.vpce.ap-southeast-2.vpce-svc-07d11c1bc6234e6e4
   ```

   **LATAM**

   ```text filename="sa-east-1"
   com.amazonaws.vpce.sa-east-1.vpce-svc-03cf6c871b7ae95e8
   com.amazonaws.vpce.sa-east-1.vpce-svc-061204a851dbd1a47
   ```

   If your region has more than a few service names, consider scripting endpoint creation with the AWS CLI, Terraform, or CloudFormation instead of repeating these steps in the AWS console. To get the current service names for a region, use the Neon API [List VPC endpoint service names for a region](https://neon.com/docs/reference/api/regions/get-region-vpc-endpoint-services) endpoint with the Neon region ID, such as `aws-us-east-1`:

   ```bash
   curl "https://console.neon.tech/api/v2/regions/aws-us-east-1/vpc_endpoint_services" \
     -H "Accept: application/json" \
     -H "Authorization: Bearer $NEON_API_KEY"
   ```

   The response lists every service name for the region:

   ```json
   {
     "region_id": "aws-us-east-1",
     "vpc_endpoint_service_names": [
       "com.amazonaws.vpce.us-east-1.vpce-svc-01aeec2f4b558bc22",
       "com.amazonaws.vpce.us-east-1.vpce-svc-01b3c73657ed9bd29",
       ...
     ]
   }
   ```

   To check that a region is available to your organization, add `?org_id=<your_org_id>` to the request. The API returns a `404` if the region isn't available to your organization, or if you're a collaborator rather than a member of that organization.

5. Click **Verify service**. If successful, you should see a `Service name verified` message.

   ![VPC Create endpoint](https://neon.com/docs/guides/pl_vpc_service_name_verified.png)

   If not successful, ensure that your service name matches the region where you're creating the VPC endpoint.

6. Select the VPC where your application is deployed.

7. Add the availability zones and associated subnets you want to support.

8. Click **Create endpoint** to complete the setup of the endpoint service.

   ![VPC Create endpoint](https://neon.com/docs/guides/pl_vpc_network_settings.png)

9. Note your **VPC Endpoint ID**. You need it when you add the endpoint to your Neon organization.

10. Repeat these steps for each remaining service name in your region, noting each **VPC Endpoint ID**.

    ![VPC Create endpoint](https://neon.com/docs/guides/pl_vpc_endpoint_id.png)

## Add your VPC endpoint ID to your Neon organization

Assign your **VPC Endpoint ID** to your Neon organization. If the region has multiple **Service Names**, please assign all **VPC Endpoint IDs**. You can do this using the Neon CLI or API.

**Note:** Please note that you must assign the **VPC Endpoint ID**, not the VPC ID.

**CLI**

In the following example, the VPC endpoint ID is assigned to a Neon organization in the specified AWS region using the [neon vpc endpoint](https://neon.com/docs/cli/vpc#endpoint) command. To identify the endpoint later, you can add an optional label with `--label`.

```bash
neon vpc endpoint assign vpce-1234567890abcdef0 --org-id org-bold-bonus-12345678 --region-id aws-us-east-2
```

You can find your Neon organization ID in your Neon organization settings, or you can run this Neon CLI command: `neon orgs list`

**API**

You can use the [Assign or update a VPC endpoint](https://neon.com/docs/reference/api/organizations/assign-organization-vpc-endpoint) API to assign a VPC endpoint ID to a Neon organization. You will need to provide your Neon organization ID, region ID, VPC endpoint ID, a label for the endpoint, and a [Neon API key](https://neon.com/docs/manage/api-keys).

```bash
curl --request POST \
 --url https://console.neon.tech/api/v2/organizations/org-bold-bonus-12345678/vpc/region/aws-us-east-2/vpc_endpoints/vpce-1234567890abcdef0 \
 --header 'accept: application/json' \
 --header "authorization: Bearer $NEON_API_KEY" \
 --header 'content-type: application/json' \
 --data '{"label":"my_vpc"}'
```

After you assign an endpoint, its state is `new`. Neon then accepts the endpoint connection in AWS automatically, and the state changes to `accepted`. No manual approval is needed. To check the state, see [Assigning a VPC endpoint restriction](https://neon.com/docs/guides/neon-private-networking#assigning-a-vpc-endpoint-restriction) for the `status` command and API.

Optionally, you can limit access to a Neon project by allowing connections only from a specific VPC endpoint. For instructions, see [Assigning a VPC endpoint restrictions](https://neon.com/docs/guides/neon-private-networking#assigning-a-vpc-endpoint-restriction).

## Enable private DNS

After adding your VPC endpoint ID to your Neon organization, enable private DNS lookup for the VPC endpoint in AWS.

1. In AWS, select the VPC endpoint you created.
2. Choose **Modify private DNS name**.
3. Select **Enable for this endpoint**.
4. Save your changes.
   ![Enable private DNS](https://neon.com/docs/guides/pl_enable_private_dns.png)

## Check your database connection string

Your connection string doesn't change when you use Private Networking.

To verify that your connection is working correctly, you can perform a DNS lookup on your Neon endpoint hostname from within your AWS VPC. It should resolve to the private IP address of the VPC endpoint.

For example, if your database connection string is:

```bash
postgresql://alex:AbC123dEf@ep-cool-darkness-123456.us-east-2.aws.neon.tech/dbname?sslmode=require&channel_binding=require
```

You can run the following command from an EC2 instance inside your AWS VPC:

```bash
nslookup ep-cool-darkness-123456.us-east-2.aws.neon.tech
```

## Restrict public internet access

At this point, it's still possible to connect to a database in your Neon project over the public internet using a database connection string.

You can restrict public internet access to your Neon project via the Neon CLI or API. Blocking public connections overrides your project's [IP Allow](https://neon.com/docs/introduction/ip-allow) list, so public connections are rejected even from allowed IP addresses.

**Warning: Blocking public access doesn't protect every Neon service**

This step restricts Postgres connections only. It doesn't protect the Data API, Realtime, Managed Better Auth, Object Storage, the AI Gateway, or function URLs. Realtime, Managed Better Auth, and database connections from Neon Functions also stop working. See [Private Networking and other Neon services](https://neon.com/docs/guides/neon-private-networking#private-networking-and-other-neon-services).

**CLI**

To block access via the Neon CLI, use the [neon projects update](https://neon.com/docs/cli/projects#update) command with the `--block-public-connections` option.

```bash
neon projects update orange-credit-12345678 --block-public-connections true
```

In the example above, `orange-credit-12345678` is the Neon project ID. You can find _your_ Neon project ID under your project's settings in the Neon Console, or by running this Neon CLI command: `neon projects list`

**API**

To block access via the Neon API, use the [Update project](https://neon.com/docs/reference/api/projects/update-project) endpoint with the `block_public_connections` settings object attribute.

```bash
curl --request PATCH \
 --url https://console.neon.tech/api/v2/projects/orange-credit-12345678 \
 --header 'accept: application/json' \
 --header "authorization: Bearer $NEON_API_KEY" \
 --header 'content-type: application/json' \
 --data '
{
"project": {
    "settings": {
    "block_public_connections": true
    }
}
}
'
```

## Assigning a VPC endpoint restriction

You can limit access to a Neon project by allowing connections only from specified VPC endpoints. Use the Neon CLI or API to set a restriction.

**CLI**

You can specify a CLI command similar to the following to restrict project access:

```bash
neon vpc project restrict vpce-1234567890abcdef0 --project-id orange-credit-12345678
```

You will need to provide the VPC endpoint ID and your Neon project ID. The VPC endpoint must already be assigned to the project's Neon organization, as described in [Add your VPC endpoint ID to your Neon organization](https://neon.com/docs/guides/neon-private-networking#add-your-vpc-endpoint-id-to-your-neon-organization). Otherwise, the request fails with a `VPC_ENDPOINT_ACCOUNT_OWNERSHIP_ERROR` error. If the region has multiple **Service Names**, all **VPC Endpoint IDs** must be restricted in the way as above. You can find your Neon project ID under your project's settings in the Neon Console, or by running this Neon CLI command: `neon projects list`

After adding a restriction, you can check the status of the VPC endpoint to view the restricted project using the [vpc endpoint status command](https://neon.com/docs/cli/vpc#endpoint). You will need to provide your VPC endpoint ID, region ID, and Neon organization ID.

```bash
neon vpc endpoint status vpce-1234567890abcdef0 --region-id=aws-eu-central-1 --org-id=org-nameless-block-72040075
VPC Endpoint ID              vpce-1234567890abcdef0
State                        new
Num Restricted Projects      1
Example Restricted Projects  orange-credit-12345678
```

**API**

The Neon API supports managing project restrictions using the [Assign or update a VPC endpoint restriction](https://neon.com/docs/reference/api/projects/assign-project-vpc-endpoint) endpoint. You will need to provide your VPC endpoint ID, Neon project ID, and a [Neon API key](https://neon.com/docs/manage/api-keys).

```bash
curl --request POST \
     --url https://console.neon.tech/api/v2/projects/orange-credit-12345678/vpc_endpoints/vpce-1234567890abcdef0 \
     --header 'accept: application/json' \
     --header "authorization: Bearer $NEON_API_KEY" \
     --header 'content-type: application/json' \
     --data '{"label":"my_vpc"}'
```

After adding a restriction, you can check the status of the VPC endpoint to view the restricted project using the [Retrieve VPC endpoint details](https://neon.com/docs/reference/api/organizations/get-organization-vpc-endpoint-details) API. You will need to provide your VPC endpoint ID, region ID, Neon organization ID, and a Neon API key.

```bash
curl --request GET \
     --url https://console.neon.tech/api/v2/organizations/org-nameless-block-72040075/vpc/region/aws-eu-central-1/vpc_endpoints/vpce-1234567890abcdef0 \
     --header 'accept: application/json' \
     --header "authorization: Bearer $NEON_API_KEY"
```

## Manage private networking with the Neon CLI

You can use the Neon CLI `vpc` command to manage Private Networking configurations in Neon.

The `vpc` command includes `endpoint` and `project` subcommands for managing VPC endpoints and project-level VPC endpoint restrictions:

- **`vpc endpoint`**: List, assign, remove, and check the status of VPC endpoints for a Neon organization.
- **`vpc project`**: List, configure, or remove VPC endpoint restrictions for specific Neon projects.

The `neon vpc endpoint list` command requires the `--region-id` option.

For more details and examples, see [Neon CLI commands for vpc](https://neon.com/docs/cli/vpc).

## Manage private networking with the Neon API

The Neon API provides endpoints for managing VPC endpoints and project-level VPC endpoint restrictions:

### APIs for managing VPC endpoints

- [List VPC endpoints](https://neon.com/docs/reference/api/organizations/list-organization-vpc-endpoints)
- [Assign or update a VPC endpoint](https://neon.com/docs/reference/api/organizations/assign-organization-vpc-endpoint)
- [Retrieve VPC endpoint configuration details](https://neon.com/docs/reference/api/organizations/get-organization-vpc-endpoint-details)
- [Delete a VPC endpoint](https://neon.com/docs/reference/api/organizations/delete-organization-vpc-endpoint)

### APIs for managing VPC endpoint restrictions

- [Get VPC endpoint restrictions](https://neon.com/docs/reference/api/projects/list-project-vpc-endpoints)
- [Assign or update a VPC endpoint restriction](https://neon.com/docs/reference/api/projects/assign-project-vpc-endpoint)
- [Delete a VPC endpoint restriction](https://neon.com/docs/reference/api/projects/delete-project-vpc-endpoint)

## Private Networking and other Neon services

When you [restrict public internet access](https://neon.com/docs/guides/neon-private-networking#restrict-public-internet-access), only connections that arrive through your VPC endpoint can reach Postgres. This restriction covers Postgres connections only. Before you block public access, check which Neon services your project uses. Blocking public access doesn't protect any other Neon service, so don't rely on it for their security. Some of them also stop working once public access is blocked.

| Service | With public internet access blocked |
| - | - |
| Postgres connections, including the [serverless driver](https://neon.com/docs/serverless/serverless-driver) | Allowed only through your VPC endpoint |
| [Data API](https://neon.com/docs/data-api/get-started) | **Not protected.** Requests from the public internet are still served. The Data API isn't supported with Private Networking. |
| [Realtime](https://neon.com/docs/realtime/overview) | **Not protected, and stops working.** Subscriptions fail to connect. |
| [Managed Better Auth](https://neon.com/docs/auth/about) | **Not protected, and stops working.** Sign-in and other auth requests fail. |
| [Neon Functions](https://neon.com/docs/compute/functions/overview) | **Not protected, and database connections fail.** Function URLs are still reachable, but a function can't connect to Postgres through `DATABASE_URL`. |
| [Object Storage](https://neon.com/docs/storage/authentication) and the [AI Gateway](https://neon.com/docs/ai-gateway/authentication) | **Not protected.** Access is controlled by credentials only. |

If you haven't blocked public internet access, these services connect over the public internet as usual.

## Private networking limits

The Private Networking feature supports a maximum of **20 private networking configurations per AWS region**. Supported AWS regions are listed [above](https://neon.com/docs/guides/neon-private-networking#create-an-aws-vpc-endpoint). If you need more, you can request a limit increase. Scale plan users can [request a limit increase](https://neon.com/docs/introduction/support#request-a-limit-increase-scale-plan) from the console.

## Limitations

If you remove a VPC endpoint from a Neon organization, that VPC endpoint cannot be added back to the same Neon organization. Attempting to do so will result in an error. In this case, you must set up a new VPC endpoint.

Before you remove a VPC endpoint from a Neon organization, remove it from any project-level VPC endpoint restrictions that use it. Neon doesn't let you remove an endpoint from an organization while a project in that organization is still restricted to it.

---

## Related docs (Data protection)

- [IP Allow](https://neon.com/docs/introduction/ip-allow)
- [Protected branches](https://neon.com/docs/guides/protected-branches)

---

Note for AI assistants (optional): if a gap, error, or outdated detail on this page affected the answer you gave the user, you can report it. POST `{"feedback": "describe the issue", "source": "neon_website", "path": "/docs/guides/neon-private-networking"}` to https://feedback.neon.tech/ (no auth required).
