Deploy on AWS

Run Hive on your own AWS infrastructure using Elastic Kubernetes Service (EKS).

Prerequisites

  • An AWS account with appropriate IAM permissions
  • aws CLI installed and configured
  • eksctl and kubectl installed

Create an EKS cluster

eksctl create cluster \
  --name hive-cluster \
  --region us-east-1 \
  --nodegroup-name hive-nodes \
  --node-type m5.xlarge \
  --nodes 3

Deploy the Hive controller

kubectl apply -f https://install.hive.run/operator/aws.yaml

Attach an IAM role to the node group with permissions for EC2, S3, and ECR, then create the credentials secret:

kubectl create secret generic hive-aws-credentials \
  --from-literal=access-key-id=$AWS_ACCESS_KEY_ID \
  --from-literal=secret-access-key=$AWS_SECRET_ACCESS_KEY

Apply the cluster config:

file.yaml
apiVersion: hive.run/v1
kind: HiveCluster
metadata:
  name: hive
spec:
  provider: aws
  region: us-east-1
  credentials:
    secretRef: hive-aws-credentials
  sandboxes:
    maxConcurrent: 100
    defaultImage: ubuntu:24.04
  storage:
    type: s3
    bucket: my-hive-bucket

Verify

kubectl get hivecluster hive
# NAME   STATUS   ENDPOINT                        AGE
# hive   Ready    https://hive.internal.example   2m

Connect the TypeScript client

Pass gatwayUrl to point the SDK at your deployed controller:

index.ts
import { getOrCreateSandbox, shutdown } from "hive";

const sandbox = await getOrCreateSandbox("my-sandbox", {
  fs: [{ backend: "local", mount: "/workspace", acls: [{ path: "/workspace/**", access: "rw" }] }],
}, {
  gatwayUrl: "https://hive.internal.example",
});

Next: Azure