Skip to main content
How to use this page: find the symptom, confirm the cause with the check, apply the fix. Startup refusals print one line to stderr — tenet-pii-enterprise: error: <reason> — and exit 2; that line is the first thing to read. Request refusals are a fixed 403 to the caller, with the reason in the service’s own log.

Diagnose a broken deployment — collects evidence read-only, matches it to this page, proposes a fix.

Open in Cursor

Requests refused with 403

Symptom. A caller gets 403. The client raises TenetLatticeError(403, …). Find who refused. Two layers refuse with a fixed 403, and the body tells them apart:
  • VPC Lattice refuses on the service’s auth policy, before anything reaches a task. The body is Lattice’s own, the request shows up in the Lattice access logs as denied (with the principal’s tags), and the service logs nothing.
  • The service re-checks every request Lattice forwards and answers {"detail": "forbidden"}. It logs the reason at WARNING: refused <METHOD> on route <route>: <reason>.
Lattice refusals — causes, most common first: Service refusals — the <reason> in the log:

Lattice answers 404

Symptom. 404 with a body that isn’t {"detail": "unknown or expired session_id"}. Cause. Each Lattice listener forwards only exact routes — detect: POST /detect, POST /redact, POST /deidentify, DELETE /sessions/{session_id}; rehydrate: POST /reidentify — and answers everything else with a fixed 404. Typical misses: a trailing slash, upper-case letters, the wrong method, /reidentify sent to the detect endpoint, or /healthz and /readyz called through Lattice (they aren’t routed; check readiness from ECS, the target groups or Kubernetes). A 404 with unknown or expired session_id comes from the service: the session’s TTL lapsed (1 h by default, sliding on writes) or it was erased. Start a new session.

Callers time out

Symptom. Connections to DetectEndpoint / RehydrateEndpoint hang or the name doesn’t resolve.

Entitlement check refuses startup

Symptom. The detect service exits at startup with one of (rehydrate doesn’t check the subscription):
Cause and fix.
  • Refused — the account isn’t subscribed (or the subscription ended), the role lacks aws-marketplace:MeterUsage on Resource: "*", or the credentials aren’t the ECS task role or IRSA. AWS rejects node roles, EKS Pod Identity and long-term keys for this call. Subscribe from the deployment account (or accept the private offer there), grant the action to the detect role, and on EKS use IRSA through the tenet-pii-enterprise-detect ServiceAccount. Billing and metering.
  • Unreachable — no com.amazonaws.<region>.metering-marketplace interface endpoint with private DNS, or its security group doesn’t admit 443 from the tasks.
A Marketplace entitlement check was throttled; starting anyway warning isn’t one of these refusals: AWS throttled the check.

KMS AccessDeniedException at startup

Symptom. A service exits at startup with one of:
Cause. The purpose in parentheses names the statement that’s missing or mismatched: Almost always it’s an encryption-context mismatch: the key policy or IAM condition pins a different tenet:deployment than the TENET_DEPLOYMENT_ID the service runs with, or misspells a purpose. Other causes: the role isn’t in the key policy at all; or the kms VPC endpoint policy denies the key. A detect Decrypt denial on pii-vault-private-key is correct — the detect role must never have that. Check.
Fix. Make the statements match the table above, with your deployment id exactly — in the key policy and the role policy. Pin only kms:EncryptionContext:tenet:purpose and kms:EncryptionContext:tenet:deployment; tenet:key_id and tenet:public_key change with every key. The statements for an existing CMK are on the CloudFormation page. Never “fix” it by changing TENET_DEPLOYMENT_ID on an existing vault: that’s refused (vault keyring belongs to deployment 'a' but TENET_DEPLOYMENT_ID is 'b'; …). InvalidCiphertextException instead of AccessDeniedException, or key pair for key_id … does not verify: the wrapped key doesn’t match its context — a different CMK than the one that wrapped the keyring, a vault restored into another deployment, or a keyring record someone changed (a swapped public key fails exactly here, by design). Point the services at the original CMK and deployment id; if the record was tampered with, treat it as a security incident.

Rehydrate or detect refuses to start: Object Lock

Symptom. A service exits with one of:
Both services audit — rehydrate writes reidentify records, detect writes erasure records — so both need the bucket. Fix.
  • No audit sink → set it: Helm rehydration.auditS3Uri and lattice.erasureAuditS3Uri; the templates set both.
  • (AccessDenied) → grant the role s3:GetBucketObjectLockConfiguration on the bucket ARN (not bucket/*). PutObject alone isn’t enough: the startup check reads the configuration.
  • Not enabled / not found → Object Lock can only be turned on for a versioned bucket. Use a bucket created with Object Lock (the templates create one), or enable it: aws s3api put-object-lock-configuration --bucket <b> --object-lock-configuration '{"ObjectLockEnabled":"Enabled","Rule":{"DefaultRetention":{"Mode":"COMPLIANCE","Days":2190}}}' after enabling versioning.
  • A warning audit bucket <bucket> has Object Lock enabled but no default retention rule; … doesn’t stop startup, but your records aren’t retention-locked. Add a default retention rule.

Reidentify returns 503: audit failed

Symptom. /reidentify returns 503 {"detail": "reidentify audit failed; nothing was restored"}; the rehydrate log shows on_reidentify hook failed for request_id=<id> with a traceback. Cause. The audit record couldn’t be written, so nothing was restored. Common causes, in order: the rehydrate role lost s3:PutObject on <bucket>/<prefix>*; the bucket’s SSE-KMS key doesn’t allow the role kms:GenerateDataKey via S3; the bucket policy’s wrong-key deny (a different KMS key than the CMK); the S3 gateway endpoint was removed from the route table or its policy excludes the bucket. Fix. Read the traceback’s AWS error code, then restore the permission or route. The client should retry after the fix; no plaintext was returned and no partial state was written.

Erasure returns 503: audit failed

Symptom. DELETE /sessions/{session_id} returns 503 {"detail": "erase audit failed; nothing was deleted"}; the detect log shows on_erase hook failed for request_id=<id>. Cause and fix. Same causes as above, for the detect role and the erasure prefix (ErasureAuditPrefix, default erasure/): s3:PutObject on <bucket>/<erasure prefix>*, kms:GenerateDataKey via S3, the S3 route. The session was kept; retry the erasure after the fix.

Rehydrate refuses to start: empty keyring

Symptom. tenet-pii-enterprise: error: vault keyring is empty: start the detect role first or run `tenet-pii-enterprise rotate-key` . Fix. Rehydrate waits up to two minutes for the detect service to create the first key pair, then gives up. Get the detect service running (its own startup error is the real cause), or run rotate-key once. Rehydrate never creates keys by design.

Lattice service lookup fails on EKS

Symptom. Pods restart from their startup probe, or exit with one of:
Cause. On EKS each pod looks up the Lattice service the AWS Gateway API Controller creates from its HTTPRoute, and waits up to 5 minutes for it. Fix.
  • Not found → the controller hasn’t created the service. Check kubectl describe httproute and the controller’s logs. In a cluster without NAT the controller needs the com.amazonaws.<region>.vpc-lattice and com.amazonaws.<region>.tagging endpoints; without tagging, route reconciliation times out and no service appears.
  • More than one → a service with the same name exists in the account or is shared into it. Rename the release, or set TENET_LATTICE_SERVICE_ARN through extraEnv.
  • ListServices failed → grant both IRSA roles vpc-lattice:ListServices, and make sure the vpc-lattice endpoint exists.

Access logs stay at TargetNotFound (EKS)

Symptom. With lattice.accessLogDestinationArn set, kubectl -n "$NS" get accesslogpolicy shows TargetNotFound after the first install, and no Lattice access logs arrive. Fix. The controller reconciled the AccessLogPolicies before it created the Lattice services, and doesn’t retry. Once the HTTPRoutes carry the application-networking.k8s.aws/lattice-assigned-domain-name annotation, run helm upgrade once more; the policies then show Accepted.

Invalid principal list at startup

Symptom. One of:
Fix. Invoker lists take IAM role ARNs only — one entry matches every session of that role. Replace users, root and wildcards with roles your callers assume, and give rehydration at least one invoker role.

TENET_VAULT_URL contains a password

Symptom. tenet-pii-enterprise: error: TENET_VAULT_URL must not contain a password; supply it via PGPASSWORD (and PGUSER). Fix. Remove the credentials from the URL — postgresql://<host>:5432/tenet?sslmode=require — and pass them as PGUSER / PGPASSWORD from a secret (Helm vault.credentialsSecret; the templates do this for you).

Database credentials stop working after a few days (ECS)

Symptom. Tasks fail readiness, the log shows vault unreachable: …, de-identify fails — about 7 days after deploy. Cause. The CloudFormation/Terraform stacks use the Aurora master secret, which RDS rotates every 7 days. ECS injected the old password at task start. Fix. aws ecs update-service --force-new-deployment both services. Long term, create a dedicated database user for the engine with its own rotation schedule and point ExistingVaultSecretArn at it.

ECS instances don’t register in a no-NAT VPC

Symptom. The ASG launches instances, but the ECS cluster shows 0 container instances; services sit at 0 running tasks. Cause. The ECS agent can’t reach the control plane. In a VPC with no NAT it needs the ecs, ecs-agent and ecs-telemetry interface endpoints, plus ecr.api, ecr.dkr, the S3 gateway (image layers), logs and sts — all with private DNS. Check. aws ec2 describe-vpc-endpoints --filters Name=vpc-id,Values=<vpc> --query 'VpcEndpoints[].{S:ServiceName,DNS:PrivateDnsEnabled,State:State}'. With EnableSsmEndpoints=true, sudo journalctl -u ecs on an instance shows the failing call. Fix. Create the missing endpoints with private DNS (or set CreateVpcEndpoints=true).

Lattice targets never become healthy (ECS)

Symptom. Tasks run, but aws vpc-lattice list-targets shows them UNAVAILABLE or UNHEALTHY, or registration fails. Fix. Keep PrivateSubnetIds in AZs that VPC Lattice supports. Check that the task security groups admit tcp/19991 from the Lattice prefix list (LatticePrefixListId must be the com.amazonaws.<region>.vpc-lattice list). Unhealthy targets that are running are usually not ready — look for vault unreachable in their log.

CloudFormation fails before creating anything

Symptom. Requires capabilities : [CAPABILITY_AUTO_EXPAND], or the template is rejected for its size. Fix. Add CAPABILITY_AUTO_EXPAND next to CAPABILITY_NAMED_IAM — the template uses the AWS::LanguageExtensions transform. The template is over CloudFormation’s inline limit, so deploy it through an S3 bucket you own (aws cloudformation deploy --s3-bucket).

Aurora engine version not offered

Symptom. VaultCluster fails with Cannot find version … for aurora-postgresql. Fix. The default is 16.15. List what your Region offers and pass one with AuroraEngineVersion / aurora_engine_version:

c9g.xlarge not offered in the Region

Symptom. The ASG or node group fails to launch with an unsupported-instance-type error. Fix. c9g isn’t in every Region. Check with aws ec2 describe-instance-type-offerings --location-type region --filters Name=instance-type,Values=c9g.xlarge, and use c8g.xlarge (InstanceType / instance_type) where it’s missing. On EKS, use c8g.xlarge anyway — see below.

EKS rehydrate callers blocked on Graviton5

Symptom. On c9g nodes, some new rehydrate callers time out against one or both rehydrate pods, while others work. Cause. The VPC CNI network policy agent can fail an eBPF map write with ENOMEM on Graviton5 and doesn’t retry, so the caller stays blocked until the next policy change. It fails closed. Confirm on a node: cannot allocate memory in /var/log/aws-routed-eni/network-policy-agent.log. AWS tracks it as aws-network-policy-agent issue 686. Fix. Run the chart on c8g.xlarge nodes, which the chart prefers. ECS isn’t affected.

EKS pods stuck Pending

Symptom. Detect pods Pending with Insufficient cpu. Cause. A request of a full cpu: 4 can’t fit on a 4-vCPU node after the kubelet reserve and DaemonSets. Or a surge pod during a rollout has no node to go to. Fix. Keep the chart’s 3500m request with a 4 limit — don’t raise the request. For rollouts, keep maxSurge: 0 unless an autoscaler or spare nodes exist. Check that nodes are arm64 and not Fargate: kubectl get nodes -L kubernetes.io/arch,eks.amazonaws.com/compute-type.

Half the capacity during deploys

Symptom. Latency rises and throughput halves during every rollout. Cause. By design: ECS minimum healthy 50% / maximum 100% (and Helm maxSurge: 0) replace replicas in place, because each detect replica fills a node. Fix. Deploy off-peak or scale up first; or set ECS 100/200 (with AsgMaxSize headroom) / Helm maxSurge: 1, maxUnavailable: 0 with an autoscaler. Upgrades.

The image doesn’t pull

Symptom. ECS tasks stop with CannotPullContainerError, or EKS pods sit in ImagePullBackOff. Cause. AWS Marketplace serves the image only from its registry in us-east-1; a subscribed account gets “not entitled” from the registry in any other Region. Common causes:
  • A copy in your own ECR. The templates point ecr.api and ecr.dkr at us-east-1, so the stack can’t reach a copy in its own Region. Set ImageUri / image_uri / image.repository to the Marketplace image, by digest from the release record.
  • Outside us-east-1, missing cross-Region endpoints. The nodes need interface endpoints whose service Region is us-east-1 for com.amazonaws.us-east-1.ecr.api, com.amazonaws.us-east-1.ecr.dkr and com.amazonaws.us-east-1.s3 (the layers). The CloudFormation template and Terraform module create them unless CreateVpcEndpoints=false / create_vpc_endpoints = false; on EKS you create them. Prerequisites.
  • The stack couldn’t create those endpoints. Creating a cross-Region endpoint needs vpce:AllowMultiRegion. Administrator and PowerUser roles have it; a deploy role scoped to specific actions needs it added.
  • The layer endpoint’s policy doesn’t allow s3:GetObject on prod-us-east-1-starport-layer-bucket/*.

Stack delete hangs

Symptom. CloudFormation delete sits on the ECS services (DRAINING) or the Auto Scaling group, or ends DELETE_FAILED on a Lattice target group with “Exceeded attempts to wait”. Cause. If the VPC endpoints are removed while services still run, the ECS agent loses its path to the control plane and can’t stop tasks. The template orders deletes to avoid this; it recurs when endpoints are external and were deleted first. The target-group failure happens when CloudFormation deletes it while ECS is still deregistering the tasks. Fix. For the target group, delete the stack again. For a hang, remove scale-in protection from the ASG’s instances, terminate them, then retry the delete.

Other quick ones