BYOC AWS private networking setup
ClickHouse BYOC on AWS supports two private connection options including VPC Peering and AWS PrivateLink.
Prerequisites
Common steps required by both VPC peering and PrivateLink.
Enable private load balancer for ClickHouse BYOC
In the ClickHouse Cloud console, enable the Private load balancer for your BYOC infrastructure.
Set up VPC peering
To create or delete VPC peering for ClickHouse BYOC, follow the steps:
Create a peering connection
- Navigate to the VPC Dashboard in ClickHouse BYOC account.
- Select Peering Connections.
- Click Create Peering Connection
- Set the VPC Requester to the ClickHouse VPC ID.
- Set the VPC Accepter to the target VPC ID. (Select another account if applicable)
- Click Create Peering Connection.
Accept the peering connection request
Go to the peering account, in the (VPC -> Peering connections -> Actions -> Accept request) page customer can approve this VPC peering request.
Add destination to ClickHouse VPC route tables
In ClickHouse BYOC account,
- Select Route Tables in the VPC Dashboard.
- Search for the ClickHouse VPC ID. Edit each route table attached to the private subnets.
- Click the Edit button under the Routes tab.
- Click Add another route.
- Enter the CIDR range of the target VPC for the Destination.
- Select “Peering Connection” and the ID of the peering connection for the Target.
Add destination to the target VPC route tables
In the peering AWS account,
- Select Route Tables in the VPC Dashboard.
- Search for the target VPC ID.
- Click the Edit button under the Routes tab.
- Click Add another route.
- Enter the CIDR range of the ClickHouse VPC for the Destination.
- Select “Peering Connection” and the ID of the peering connection for the Target.
Edit security group to allow peered VPC access
In the ClickHouse BYOC account, you need to update the Security Group settings to allow traffic from your peered VPC. Please contact ClickHouse Support to request the addition of inbound rules that include the CIDR ranges of your peered VPC.
The ClickHouse service should now be accessible from the peered VPC.
To access ClickHouse privately, a private load balancer and endpoint are provisioned for secure connectivity from the user's peered VPC. The private endpoint follows the public endpoint format with a -private suffix. For example:
- Public endpoint:
h5ju65kv87.mhp0y4dmph.us-west-2.aws.byoc.clickhouse.cloud - Private endpoint:
h5ju65kv87-private.mhp0y4dmph.us-west-2.aws.byoc.clickhouse.cloud
Optional, after verifying that peering is working, you can request the removal of the public load balancer for ClickHouse BYOC.
Set up PrivateLink
AWS PrivateLink provides a secure and private connection to your ClickHouse BYOC services without the need for VPC peering or internet gateways. All traffic flows within the AWS network, ensuring that it never traverses the public internet.
Enable private link in ClickHouse console
Make sure the private load balancer is turned on as a prerequisite.
Obtain endpoint "Service name"
- In the ClickHouse Cloud console, navigate to the service's Settings page that you would like to connect to via PrivateLink.
- Click "Set up private endpoint".
- In the opened flyout, copy the
Service namevalue — you'll use it in the next step. (It may take a while for the value to be generated after enabling PrivateLink.)
Create endpoint in your network
-
Open your own AWS console (i.e. the AWS account where your client application is) → VPC → Endpoints → Create endpoints.
-
Select "Endpoint services that use NLBs and GWLBs" and use
Service nameobtained from the last step. -
Click "Verify service".
-
(Optional) If you want to establish a cross-regional connection via PrivateLink, enable the "Cross region endpoint" checkbox and specify the service region. The service region is where the ClickHouse instance is running.
-
Select your VPC and subnets (one per availability zone is recommended).
-
Important: Enable "Private DNS names" for the endpoint — this is required for Private DNS to function correctly. Private DNS for BYOC endpoints (using the
*.vpce.{subdomain}format) leverages AWS PrivateLink's built-in "Private DNS names" feature. No Route53 records are required — DNS resolution happens automatically when:-
"Private DNS names" is enabled and
-
"DNS Hostnames" is enabled
via VPC Settings → DNS resolution and DNS hostnames.
This ensures that connections using the
vpcesubdomain automatically route through the PrivateLink endpoint without additional DNS configuration.
-
-
(Optional) Assign Security groups/Tags.
NoteMake sure that ports
443,8443,9440,3306are allowed in the security group. -
Click "Create endpoint", wait a moment for the endpoint to be created.
-
After creating the endpoint, copy the
Endpoint IDvalue — you'll use it in the next step.
Approve the endpoint connection
- Open your BYOC VPC console again → Endpoint services →
clickhouse-cloud-infra-xxx→ Endpoint connections. - Find the connection request created from your own VPC and click "Accept endpoint connection request" to approve it.
Add "Endpoint ID" to ClickHouse service allow list
- In the ClickHouse Cloud console, navigate to the service's Settings page that you would like to connect to via PrivateLink.
- Click "Set up private endpoint".
- In the opened flyout, enter the
Endpoint IDobtained from the last step with an optional description. - Click "Create endpoint".
If you want to allow access from an existing PrivateLink connection, use the existing endpoint dropdown menu. The dropdown will show the existing PrivateLink connections to the services within the same infrastructure.
Access an instance using PrivateLink
-
In the ClickHouse Cloud console, navigate to service's Settings page.
-
Click "Set up private endpoint".
-
In the opened flyout, copy the
DNS name.Access to ClickHouse services via PrivateLink is controlled at two levels:
- Istio Authorization Policy: ClickHouse Cloud's service-level authorization policies
- VPC Endpoint Security Group: The security group attached to your VPC endpoint controls which resources in your VPC can use the endpoint
NoteThe private load balancer's "Enforce inbound rules on PrivateLink traffic" feature is disabled, so access is controlled by Istio authorization policies and your VPC endpoint's security group only.