> ## 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.

# Standard reference architecture

> Private subnets, NAT gateway egress and an internal load balancer for e6data In-VPC on AWS.

ReferenceApplies to: CloudPrem on AWS

The Standard architecture puts e6data in private subnets, sends outbound traffic through a NAT gateway, and exposes the workspace on an internal load balancer only. It is the simplest setup and matches the public install guide, with the endpoint switched from internet-facing to internal.

## Diagram

![Standard architecture on AWS: an EKS cluster in private subnets across two zones sends outbound HTTPS 443 to the e6data control plane through a NAT gateway and internet gateway, reads S3 data through an S3 gateway endpoint, and serves users on ports 443 and 5432 through an internal load balancer reached over VPN, Direct Connect, peering or Transit Gateway](https://mintcdn.com/e6data/btk547UQntSoisHC/images/platform/in-vpc/aws-standard.svg?fit=max\&auto=format\&n=btk547UQntSoisHC\&q=85\&s=f3b7d9f6c1b5166ed82ef1435f8c9486)

## Requirements

* Nodes run in private subnets in at least 2 availability zones.
* A NAT gateway gives the private subnets outbound access. It sits in a public subnet with an internet gateway. e6data's install uses one NAT gateway; if its zone fails, every zone loses outbound access (control plane, image pulls). Use one NAT gateway per zone, or another egress path, if that matters to you.
* The workspace endpoint is an internal load balancer. It gets private IPs only.
* Set load-balancer source ranges so the security group is not opened to `0.0.0.0/0`.
* Add the S3 gateway endpoint to the private route table. It keeps S3 traffic off the NAT.
* A DNS record for the workspace hostname in a zone your users resolve, pointing at the internal load balancer.
* Outbound HTTPS 443 to the hosts in [Hostnames, ports and IPs](https://docs.e6data.com/platform/deploy/aws-cloudprem/hostnames-and-ports.md).
* Subnet sizes and CIDR ranges: see [Network requirements](https://docs.e6data.com/platform/deploy/aws-cloudprem/network-requirements.md) and [IP address sizing](https://docs.e6data.com/platform/deploy/aws-cloudprem/ip-address-sizing.md).

| Item | AWS | Required? | Why |
| - | - | - | - |
| Outbound path | NAT gateway in a public subnet, default route `0.0.0.0/0` from private subnets | Yes | Console reaches the control plane; nodes pull images |
| Endpoint | Network Load Balancer with scheme `internal` | Yes (for this architecture) | No public endpoint |
| Endpoint setting | Annotations `service.beta.kubernetes.io/aws-load-balancer-scheme: internal` and `service.beta.kubernetes.io/aws-load-balancer-internal: "true"` on the QueryRouter's `mergedService` (set both) | Yes | The `scheme` and `nlb-target-type` annotations are read only by the AWS Load Balancer Controller. Without the controller, the built-in provider makes an internet-facing load balancer unless `aws-load-balancer-internal` is set |
| Source ranges | `service.beta.kubernetes.io/load-balancer-source-ranges` set to your VPC and VPN ranges | Recommended | Security reviews flag `0.0.0.0/0` |
| Private storage path | S3 gateway endpoint on the private route table | Recommended | Keeps data traffic off NAT |
| Kubernetes API | Private endpoint access on; public access optional | Recommended | Run the install commands (kubectl, helm) from inside your network |

## Steps

1. Build the network: private subnets in 2 zones, a NAT gateway, and the S3 gateway endpoint.
2. Create or reuse the cluster in the private subnets.
3. Install e6data with [Configure registry, VPC, EKS, and networking](https://docs.e6data.com/platform/deploy/aws-cloudprem/configure-registry-vpc-eks-networking.md) and [Deploy workspace and e6data](https://docs.e6data.com/platform/deploy/aws-cloudprem/deploy-workspace.md). In the **Apply the QueryRouter** step, replace the `mergedService` block at the end of the manifest with this one, so the endpoint is internal:

   ```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>"
   ```

   For a workspace that is already running, see [Private-only deployment](https://docs.e6data.com/platform/deploy/aws-cloudprem/private-only-deployment.md) for the `kubectl patch` that makes the endpoint internal.
4. Create the workspace DNS record in your private hosted zone or internal DNS, pointing at the internal load balancer.

## Traffic paths

| # | Traffic | From | To | Port | Direction | AWS path |
| - | - | - | - | - | - | - |
| 1 | Control-plane polling and sign-in keys | Console (and query router) | e6data control plane | TCP 443 | Outbound | NAT gateway, internet gateway |
| 2 | Image pulls | Nodes | e6data registry or your mirror | TCP 443 | Outbound | NAT, or ECR endpoints |
| 3 | Data and metadata reads and writes | Engine, metadata service, console | Your storage | TCP 443 | Outbound, stays in the cloud network | S3 gateway endpoint |
| 4 | Cloud API calls | Console, Karpenter, AWS Load Balancer Controller, EBS CSI driver, VPC CNI (node role) | Cloud APIs | TCP 443 | Outbound | NAT |
| 5 | Console, HTTP and gRPC queries | Your users | Internal load balancer | TCP 443 | Inbound from your network | VPN, Direct Connect, peering or Transit Gateway |
| 6 | Postgres wire protocol (JDBC, BI tools) | Your users | Internal load balancer | TCP 5432 | Inbound from your network | As row 5 |

## Validation checklist

All checks are read-only.

* Private subnets have a default route to the NAT gateway.
  * `aws ec2 describe-route-tables --filters Name=association.subnet-id,Values=<PRIVATE_SUBNET_ID> --query "RouteTables[].Routes[?DestinationCidrBlock=='0.0.0.0/0'].NatGatewayId"` returns a `nat-...` ID.
* Nodes have no public IPs.
  * `aws ec2 describe-instances --filters Name=vpc-id,Values=<VPC_ID> --query 'Reservations[].Instances[].PublicIpAddress'` returns an empty list.
* The S3 gateway endpoint is present.
  * `aws ec2 describe-vpc-endpoints --filters Name=vpc-id,Values=<VPC_ID> Name=service-name,Values=com.amazonaws.<REGION>.s3 --query 'VpcEndpoints[].RouteTableIds'` lists the private route tables.
* The endpoint is internal: `dig +short <WORKSPACE_HOSTNAME>` returns a private IP (10.x, 172.16-31.x or 192.168.x).
  * `aws elbv2 describe-load-balancers --query 'LoadBalancers[].[LoadBalancerName,Scheme]'` shows `internal` for the workspace load balancer.
* From outside your network, `curl -m 10 https://<WORKSPACE_HOSTNAME>/` fails.
* From inside your network, `curl https://<WORKSPACE_HOSTNAME>/` returns HTTP 200 and `nc -z <WORKSPACE_HOSTNAME> 5432` succeeds.
* The workspace shows **Running** in the e6data control plane. This status arrives through outbound calls only.
* You can sign in, resume a cluster, run a query and see it in Query History.

## Troubleshooting

| Symptom | Cause | Fix |
| - | - | - |
| Workspace shows Disconnected in the control plane | No outbound 443 to the control plane | Check the NAT route and the hosts in [Hostnames, ports and IPs](https://docs.e6data.com/platform/deploy/aws-cloudprem/hostnames-and-ports.md) |
| Security review flags `0.0.0.0/0` on the load balancer | Source ranges not set | Add the `load-balancer-source-ranges` annotation |
| 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 |
| Hostname resolves to nothing from user machines | DNS record only in a zone users don't resolve | Add the record to your internal DNS |
| Long queries drop after a few minutes | Load balancer idle timeout. The NLB default is 350 s. The install steps in these docs keep the default. e6data's managed install sets 1,200 s on 443, which works only with AWS Load Balancer Controller v2.9 or later (its default is v2.8.1), and never raises 5432 | Raise both listeners' idle timeouts (up to 6,000 s) or turn on client keepalives. See [Troubleshooting](https://docs.e6data.com/platform/deploy/aws-cloudprem/troubleshooting.md) |

## Limitations

* Private connectivity (PrivateLink) to the e6data control plane is not offered today.
* The NAT gateway gives all nodes a general internet route. If that is not allowed, use the [Hardened](https://docs.e6data.com/platform/deploy/aws-cloudprem/reference-architecture-hardened.md) or [Isolated](https://docs.e6data.com/platform/deploy/aws-cloudprem/reference-architecture-isolated.md) architecture.

## See also

* [Reference architectures](https://docs.e6data.com/platform/deploy/aws-cloudprem/reference-architectures.md)
* [Network requirements](https://docs.e6data.com/platform/deploy/aws-cloudprem/network-requirements.md)
* [Private-only deployment](https://docs.e6data.com/platform/deploy/aws-cloudprem/private-only-deployment.md)
* [Connect to other networks](https://docs.e6data.com/platform/deploy/aws-cloudprem/connect-to-other-networks.md)
* [Install with your own tooling](https://docs.e6data.com/platform/deploy/aws-cloudprem/install-with-your-own-tooling.md)


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