
Multi-Tenant Infra on Amazon EKS with definition on Git
Explore multi-tenant SaaS on Amazon EKS using Argo CD, ACK, kro, and GitOps for automated tenant provisioning, Kubernetes security, and Amazon Bedrock AI integration.
I recently worked through an AWS-hosted workshop on building multi-tenant SaaS on Amazon EKS. I had a three-hour lab window and finished it. The app was a number-guessing game with an optional AI game host. What I cared about was the platform around it: can a new customer be onboarded with a Git commit and end up with the right compute, storage, identity and model access?
How a tenant definition turns into infrastructure
The lab gave me two EKS Auto Mode clusters, one for GitOps and one for tenant workloads. I deployed the game in mock mode, then used ACK (AWS Controllers for Kubernetes) to create DynamoDB and S3 and wire up IAM and EKS Pod Identity, so the pod gets short-lived credentials and no access keys.
Doing that by hand showed me why kro is useful. A kro
ResourceGraphDefinition describes a custom resource and the dependencies between everything behind it, so the platform can offer one Tenant resource instead of a pile of manifests.
Image Source: AWS Workshop Studio.
I added three Basic tenants and one Pro tenant to the workloads repo. Argo CD synced them, kro picked the tier package, and ACK created the AWS resources:
kubectl --context data-plane get tenant -n tenantskubectl --context data-plane get hpa -n tenant-004kubectl --context data-plane get nodepool pro-tenant-004Basic tenants shared compute, S3 and DynamoDB. The Pro tenant got a dedicated NodePool, its own bucket and table, three starting replicas and an HPA up to ten. The image was identical. Basic used Amazon Nova Micro for the game host and Pro used Nova Lite.
One gotcha if you repeat it: wait on ACK's
ACK.ResourceSynced condition, not just on kubectl apply . The API server accepts the manifest long before AWS has created the resource.A feature flag doesn't enforce a tier
The model difference is only configuration. If a Basic pod can call the Pro model with its own credentials, the tier exists in the app code and nowhere else. The workshop covers this with a negative test, and when I ran it from a Basic pod, calling the Pro model failed with
AccessDeniedException while the Basic model worked.That makes IAM the actual boundary. It controls which model a tenant can use, not how much, so a production AI feature also needs per-tenant metering, budgets and throttling. Per-tenant roles don't help when everyone shares one account-level Bedrock quota.
DynamoDB shows the same gap. The lab scopes items with
dynamodb:LeadingKeys , and the AWS docs say Scan can't be limited that way, so a role that allows it can read the whole table. I'd review every action a tenant role allows, not only the ones I tested.What I'd test next
I ran the isolation tests too, and each one came back as the workshop said it would. The cases I'd want to see are a blueprint changing while tenants are live, a half-finished provisioning, a tenant moving from Basic to Pro, and a deletion stuck on a finalizer. Offboarding also needs a plan: removing a Basic tenant doesn't delete its rows in the shared table, and removing a Pro tenant can delete its storage.
I wrote up the whole thing, including isolation tests, cost attribution and what I'd change for production, on my blog: How Much Can a Single Tenant Definition Provision on Amazon EKS?
To try the workshop, start with the public Building SaaS on EKS workshop . I used the AWS-hosted edition, so some exercises may differ. Check costs and cleanup before running it in your own account.
Thanks to AWS for the workshop, sample app and lab environment. The diagram is from AWS Workshop Studio.
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article