> ## Documentation Index
> Fetch the complete documentation index at: https://docs.e6data.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Private-only deployment

> Run e6data on AWS with no public endpoint, no public IP and a private Kubernetes API.

How-to guideApplies to: CloudPrem on AWS

You can run e6data with no public endpoint, no public IP and a private Kubernetes API. Users reach it over your private network. The cluster still needs one outbound path to the e6data control plane, because private connectivity to the control plane is not offered today.

![Diagram of a private-only CloudPrem deployment on AWS. Users and BI tools reach an internal Network Load Balancer over VPN or Direct Connect on TCP 443 and 5432, and a private hosted zone points the workspace hostname at it. The EKS cluster has a private API endpoint only, installs run from inside your network, cloud APIs are reached through VPC endpoints, and data is read through the S3 gateway endpoint. The only outbound path is TCP 443 to the e6data control plane through NAT, your firewall or your proxy. e6data never connects in.](https://mintcdn.com/e6data/btk547UQntSoisHC/images/platform/in-vpc/aws-private-only.svg?fit=max\&auto=format\&n=btk547UQntSoisHC\&q=85\&s=421f80cfd9ef2372f1c36a5193cd3e33)

## Requirements

* An internal load balancer (or NodePort behind your own load balancer) for the workspace endpoint.
* A DNS record for the workspace hostname in a zone your users resolve, pointing at the private address.
* A private Kubernetes API, and an install host inside your network.
* One outbound path to the e6data control plane on TCP 443: NAT, your firewall, or your proxy.
* Private access to cloud services the cluster uses: VPC endpoints. They are required only when there is no NAT; a NAT gateway or central firewall for egress also works.

| Item | AWS | Required? | Why |
| - | - | - | - |
| Workspace endpoint | Internal Network Load Balancer | Yes | No public address |
| Who may connect | `load-balancer-source-ranges` annotation | Yes | Otherwise the AWS controller opens the load balancer to `0.0.0.0/0` |
| Kubernetes API | Private endpoint only | Yes | No public API |
| Egress without NAT | VPC endpoints plus a route or proxy for the control plane | Conditional | Under a "no public IP" policy, NAT can't be used |
| Data access | S3 gateway endpoint | Yes | Data stays on private paths |

## Steps

**1. Make the workspace endpoint internal**

By default the install creates an internet-facing load balancer open to all source addresses. Make it internal before you apply the QueryRouter: in the [Apply the QueryRouter](https://docs.e6data.com/platform/deploy/aws-cloudprem/deploy-workspace.md#step-2-deploy-the-workspace) step, replace the `mergedService` block at the end of the manifest with this one (the same settings as the [Standard reference architecture](https://docs.e6data.com/platform/deploy/aws-cloudprem/reference-architecture-standard.md)):

```yaml theme={"theme":{"light":"github-light","dark":"github-dark"}}
    mergedService:
      type: LoadBalancer
      annotations:
        service.beta.kubernetes.io/aws-load-balancer-nlb-target-type: ip
        service.beta.kubernetes.io/aws-load-balancer-scheme: internal
        service.beta.kubernetes.io/aws-load-balancer-internal: "true"
        service.beta.kubernetes.io/aws-load-balancer-cross-zone-load-balancing-enabled: "true"
        service.beta.kubernetes.io/load-balancer-source-ranges: "<VPC_CIDR>,<VPN_OR_DIRECT_CONNECT_CIDR>"
```

Alternative: set `type: NodePort` and put your own load balancer in front.

If the workspace is already running, change the scheme on the live QueryRouter instead. The load balancer is replaced and gets a new DNS name, so update your DNS record afterwards:

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
kubectl -n ${NAMESPACE} patch queryrouter ${WORKSPACE_NAME}-qr --type merge -p '{
  "spec": {"auth": {"mergedService": {"annotations": {
    "service.beta.kubernetes.io/aws-load-balancer-scheme": "internal",
    "service.beta.kubernetes.io/aws-load-balancer-internal": "true",
    "service.beta.kubernetes.io/load-balancer-source-ranges": "<VPC_CIDR>,<VPN_OR_DIRECT_CONNECT_CIDR>"
  }}}}}'
```

**2. Set up DNS**

Create the workspace hostname in a private hosted zone, or your internal DNS. Point it at the internal load balancer.

**3. Make the Kubernetes API private**

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
aws eks update-cluster-config --name <CLUSTER> \
  --resources-vpc-config endpointPublicAccess=false,endpointPrivateAccess=true
```

**4. Run installs from inside your network**

Use a bastion host, an AWS Systems Manager session, a CI runner in the VPC, or a VPN.

**5. Set up egress with no NAT**

Create these endpoints in the workspace VPC (interface endpoints in the node subnets, private DNS on, HTTPS allowed from the VPC):

| Endpoint | Why |
| - | - |
| `com.amazonaws.<region>.ecr.api`, `ecr.dkr` | Pull e6data images |
| `com.amazonaws.<region>.s3` (gateway) | Image layers, data and metadata buckets |
| `com.amazonaws.<region>.sts` | Pod credentials |
| `com.amazonaws.<region>.eks-auth` | EKS Pod Identity |
| `com.amazonaws.<region>.ec2` | Instance type information |
| `com.amazonaws.<region>.glue` | AWS Glue catalogs (if used) |
| `com.amazonaws.<region>.lakeformation` | Only if a catalog uses Lake Formation. Without it, every schema shows "Access Denied" |
| `com.amazonaws.<region>.autoscaling` | Only if you run the Cluster Autoscaler |
| `com.amazonaws.<region>.ssm` | Karpenter (upstream or e6data's) looks up machine images through it |
| `com.amazonaws.<region>.sqs` | Karpenter reads its interruption queue |
| `com.amazonaws.<region>.eks` | Only if your install host has no internet access |
| `com.amazonaws.<region>.ssmmessages`, `ec2messages` | Only with warm pools: they run commands on parked machines through SSM |

Then send traffic for the e6data control plane to your central firewall (for example `0.0.0.0/0` to a Transit Gateway). See [Connect to other networks](https://docs.e6data.com/platform/deploy/aws-cloudprem/connect-to-other-networks.md).

**6. Keep data access private**

The S3 gateway endpoint covers same-region buckets.

## Cost impact

* AWS interface endpoints are billed per AZ per hour and per GB. The S3 gateway endpoint is free.
* Removing the NAT gateway removes its hourly and per-GB charge.

## Preflight check

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
aws eks describe-cluster --name <CLUSTER> --query 'cluster.resourcesVpcConfig.[endpointPublicAccess,endpointPrivateAccess]'
aws ec2 describe-vpc-endpoints --filters Name=vpc-id,Values=<VPC_ID> --query 'VpcEndpoints[].ServiceName'
```

If an endpoint from the table is missing, create it before install. If a deny-public-IP policy exists, use firewall egress and an internal load balancer.

## Verify

From **outside** your network:

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
dig +short <WORKSPACE_HOSTNAME>          # a private IP (10.x, 172.16-31.x or 192.168.x)
curl -m 10 https://<WORKSPACE_HOSTNAME>/ # fails: not reachable
kubectl get nodes                        # fails: API endpoint not public
```

From **inside** your network:

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl https://<WORKSPACE_HOSTNAME>/       # HTTP 200
nc -z <WORKSPACE_HOSTNAME> 5432          # port open
```

Then sign in to the e6data console from your network, resume a cluster, run a query and find it in Query History. The workspace shows **Running**, which arrives through outbound calls only.

## Troubleshooting

| Symptom | Cause | Fix |
| - | - | - |
| Timeout when testing from a pod on the same node as Envoy | NLB hairpin with client IP preservation | Test from another node or from outside the cluster |
| Security review flags `0.0.0.0/0` on the load balancer | Source ranges not set | Add `load-balancer-source-ranges` |
| Schemas show "Access Denied" with no NAT | Missing Lake Formation endpoint | Add `com.amazonaws.<region>.lakeformation` |

## Limitations

* Private connectivity to the e6data control plane (PrivateLink): Not offered today. The cluster needs an outbound path on 443.
* A fully air-gapped network: Not supported today.
* No NAT with an explicit proxy as the only route out: Not supported today.

## See also

* [Network requirements](https://docs.e6data.com/platform/deploy/aws-cloudprem/network-requirements.md)
* [Proxy and TLS inspection](https://docs.e6data.com/platform/deploy/aws-cloudprem/proxy-and-tls-inspection.md)
* [Isolated reference architecture](https://docs.e6data.com/platform/deploy/aws-cloudprem/reference-architecture-isolated.md)
* [Hostnames and ports](https://docs.e6data.com/platform/deploy/aws-cloudprem/hostnames-and-ports.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.