- The AWS region of your Xata databases (e.g.
us-east-1) - The AWS account ID (or IAM role/user ARN) you will create the endpoint from.
com.amazonaws.vpce.us-east-1.vpce-svc-....
How it works
Xata exposes its Postgres gateway as a VPC endpoint service. You create an interface VPC endpoint against it in your VPC, which places network interfaces (ENIs) with private IPs in your subnets. With private DNS enabled, your existing database hostnames (<branch>.us-east-1.xata.tech) resolve to
those private IPs inside your VPC. This means the same connection string uses the
private path from your VPC and the public path from everywhere else.
Prerequisites
- A VPC in the same region and Availability Zone (AZ) as your Xata databases.
- The VPC must have DNS support and DNS hostnames enabled
(
enableDnsSupportandenableDnsHostnames, both on by default for most VPCs).
Step 1 — Create a security group for the endpoint
The endpoint’s network interfaces need a security group that allows inbound traffic from your clients:- TCP
5432(Postgres wire protocol) from your application’s security group or CIDR ranges - TCP
443(HTTPS) from the same sources — only needed if you use the serverless HTTP driver
Step 2 — Create the interface VPC endpoint
In the AWS console, go to VPC → PrivateLink and Lattice → Endpoints and click Create endpoint:- Optionally give the endpoint a Name tag (e.g.
xata). - Under Type, select Endpoint services that use NLBs and GWLBs (“Find services shared with you by service name”).
- Leave Enable Cross Region endpoint unchecked. Your endpoint must be in the same region as your Xata databases.
- In the Service name field, paste the service name provided by Xata
(
com.amazonaws.vpce.us-east-1.vpce-svc-…) and click Verify service. If this fails with a permissions error, please contact us. - The form expands: select your VPC and one subnet per Availability Zone you want to use.
- Attach the security group from step 1.
- Enable Private DNS names. This is what makes your existing Xata hostnames resolve to the endpoint inside your VPC. No DNS changes should be needed on your side. You can also enable it later from the endpoint’s Actions → Modify private DNS name.
- Click Create endpoint.