Skip to main content
The deployment boundary: private subnets with no internet route, callers reaching the services only through Amazon VPC Lattice as their own IAM roles, AWS APIs reached only through VPC endpoints, data encrypted under your own KMS key, and an audit bucket nobody can rewrite. The CloudFormation template and the Terraform module create the KMS key, Aurora cluster, audit bucket, endpoints, roles and VPC Lattice services for you. The Helm chart creates none of the AWS side — on EKS you bring all of this. Either way, check this page first.

When to use it

Before your first deploy, and when a security review asks what the deployment needs from the account.

Audit an existing VPC and account against these prerequisites — read-only, changes nothing.

Open in Cursor

Network: no NAT, no internet route

  • DNS hostnames and DNS support enabled on the VPC. Interface endpoints’ private DNS needs both.
  • Private subnets in at least two AZs (three recommended), one subnet per AZ. Detect replicas spread across AZs, and an interface endpoint takes at most one subnet per AZ.
  • AZs that VPC Lattice supports. Lattice isn’t offered in every AZ — use1-az3 in us-east-1, for example. Targets in an unsupported AZ fail to register.
  • No route to a NAT gateway or internet gateway from those subnets. The templates never create one, and nothing in the product needs one. The only exception is the opt-in usage-telemetry egress in the CloudFormation and Terraform templates, which you turn on deliberately.
  • No public IPs, no internet-facing load balancer. Callers reach the services through VPC Lattice, as their own IAM roles; tasks and pods admit port 19991 only from the com.amazonaws.<region>.vpc-lattice prefix list.
  • One service network per VPC. If your VPC is already associated with a VPC Lattice service network, the stack joins its services to that one (ExistingServiceNetworkArn / existing_service_network_arn) and you own that network’s auth policy and VPC associations. On EKS, the Gateway you create is the service network.
Sites with no AWS API reachability at all aren’t supported: the detect service checks the Marketplace subscription through the metering-marketplace endpoint at startup, and every Region pulls the image from AWS Marketplace in us-east-1. In-VPC through VPC endpoints is the supported shape.

VPC endpoints

Create these with private DNS enabled, in the deployment Region, with a security group that admits 443 from the VPC. The services use standard AWS endpoint resolution, so private DNS is what routes them to the endpoints. The CloudFormation template and Terraform module create the ECS set, including the cross-Region image endpoints outside us-east-1 (CreateVpcEndpoints / create_vpc_endpoints). Creating a cross-Region endpoint needs vpce:AllowMultiRegion: Administrator and PowerUser roles have it, a deploy role scoped to specific actions doesn’t. If the VPC already has private-DNS endpoints for any of them, turn creation off — a second private-DNS endpoint for the same service fails.

Instances

  • Graviton, arm64. ECS: default c9g.xlarge, c8g.xlarge where C9g isn’t offered. EKS: use c8g.xlarge — on Graviton5 (c9g) the VPC CNI network policy agent can fail a map write and leave a rehydrate caller blocked (aws-network-policy-agent issue). Confirm in your Region:
  • EC2 only — ECS on EC2 or EKS managed node groups. Fargate isn’t supported.
  • One detect replica per 4-vCPU node. The detect worker uses 4 threads; plan nodes accordingly. Sizing.
  • On-Demand vCPU quota (Standard instances). ECS: 8 vCPUs for the default two detect tasks, 12 with rehydration. EKS: 16 with rehydration (four c8g.xlarge), 8 without — plus headroom if node group updates add a surge node.

Customer-managed KMS key

A symmetric key you own (SYMMETRIC_DEFAULT). It wraps the vault keys and, in the templates, encrypts Aurora storage, the audit bucket, the log groups and the database secret. Tenet never appears in its key policy. Each vault key is a key pair: a lookup key (for dedupe and session_ref) and an X25519 private key that opens stored values. The detect service creates each pair, wraps both halves with kms:Encrypt, and keeps only the public half — so it can’t decrypt a stored value. Only rehydrate unwraps the private key. Each wrapped half carries its own encryption context:
Every key-policy and IAM statement for vault keys must pin both kms:EncryptionContext:tenet:purpose and kms:EncryptionContext:tenet:deployment = your deployment id. tenet:key_id and tenet:public_key change with every key, so don’t pin them. Put the detect Denies in the key policy and in the detect role’s own policy, so no IAM policy attached later can lift them. If a pinned value differs from what the runtime sends, the KMS call is denied — see Troubleshooting.
Pick the deployment id once — 3–63 characters, lowercase letters, digits and hyphens, e.g. acme-prod-use1 — and never change it. It’s bound into every wrapped key and stamped into the vault; the services refuse to start if it changes.
If you lose the key, the vault and the audit objects can’t be read, and Tenet can’t help.

Aurora PostgreSQL vault

  • Aurora PostgreSQL, encrypted with the CMK, in the private subnets, not publicly accessible. The templates create Serverless v2 (0.5–8 ACUs, writer + reader).
  • Engine version: the templates default to 16.15. Confirm it’s offered in your Region:
  • Credentials go to the services as libpq’s PGUSER/PGPASSWORD. TENET_VAULT_URL carries host, port, database and sslmode — never a password; the services refuse to start if it has one.
  • Security group: port 5432 from the detect and rehydrate services only.
  • The vault holds only sealed values, keyed digests and TTLs. Rows expire with the session TTL (1 hour by default).

S3 audit bucket with Object Lock

Needed by both services: rehydrate writes a record per re-identify call, and detect writes a record before each session erasure. Give each its own prefix (the templates use rehydrate/ and erasure/).
  • Object Lock enabled (which requires versioning). Both services check this at startup and refuse to run without it.
  • A default retention rule. The templates default to 2190 days (6 years). Use COMPLIANCE mode in production — nobody, including the root user, can delete or shorten retention. GOVERNANCE exists for trial stacks you want to tear down.
  • SSE-KMS with the CMK, public access blocked, TLS required.
  • Writes only from the two service roles. The templates’ bucket policy denies PutObject to every other principal and BypassGovernanceRetention to everyone; each role’s own policy confines it to its prefix.

IAM roles

Two workload roles, never shared — the chart rejects the same role for both. AWS accepts detect’s MeterUsage only from the ECS task role or IRSA — not node roles, EKS Pod Identity or long-term keys. On EKS these are IRSA roles; on ECS they’re task roles, plus a separate execution role per service. Callers are your own roles, listed by ARN in the deploy inputs (detect, erasure and rehydrate invokers). Each needs vpc-lattice-svcs:Invoke on the service in its own IAM policy, as well as being named in the service’s auth policy. List IAM role ARNs only — users, root and wildcards are refused at startup. The full matrix — execution roles, invokers, break-glass, audit reader — is in Architecture.

Gotchas

  • metering-marketplace unreachable means no detect. The subscription check runs before detect serves; a missing endpoint or missing MeterUsage permission fails startup with the AWS error. Billing.
  • Both roles need s3:GetBucketObjectLockConfiguration, not just PutObject. Without it the startup check fails and the service won’t start.
  • Endpoint policies. If you restrict endpoint policies, the KMS, Logs, Secrets Manager and S3 endpoints must allow your account’s resources, and the S3 gateway must also allow ECR’s layer bucket for your Region.