AWS Multi-Tenant Architecture: Choose an Isolation Model

  • Thursday, November 26, 2026
  • 11 min read

AWS multi tenant architecture compared: silo versus pool, with row-level security tested on 1,000,000 rows and the AWS quota limits that shape each choice.

AWS Multi-Tenant Architecture: Choose an Isolation Model

AWS multi tenant architecture starts with one question: which resources do your tenants share? AWS names two ends and a mix between them. Silo dedicates resources to each tenant, and pool shares them. Bridge sits between the two. Each choice trades isolation against cost and effort. This guide explains the AWS wording, then tests the hardest part of the pool model, keeping one tenant's rows away from another, on a PostgreSQL database with 1,000,000 rows and 1,000 tenants.

This guide helps founders and engineers who must pick a tenancy model for a SaaS product on AWS. Our guide to multi-tenant SaaS architecture covers the three database-level models in general terms. This guide adds the AWS vocabulary and the account limits that shape each option, and it backs the advice with our own test results. We ran the tests on PostgreSQL 14.20 on a laptop, so they show behaviour and ratios, and your timings on Amazon RDS or Aurora will differ.

Key takeaways

  • AWS defines two ends and a mix between them. Silo dedicates resources to each tenant and pool shares them, while bridge decides service by service.
  • AWS's multi-tenant guidance maps the models onto the database tier, from an instance per tenant at the silo end to row-level security at the pool end.
  • On a 1,000,000-row table, row-level security added 0.007 to 0.008 ms to an indexed query (0.113 to 0.116 ms before, 0.121 to 0.123 ms after) and turned a query with no tenant filter from 1,000,000 rows into 1,000.
  • Superusers and roles with BYPASSRLS skip row-level security, and so does the table owner unless you force it. A session-level SET leaked tenant 42 into the next request on the same connection.
  • S3 allows 10,000 general purpose buckets per AWS account by default, so a bucket per tenant needs a quota increase before tenant 10,001.
  • A thousand tenant schemas created six relations per tenant and made a dump of the schema about 15 times slower: 1.2 seconds against 0.08.

What do silo and pool mean on AWS?

The AWS SaaS Lens defines the silo model as an architecture where each tenant gets dedicated resources, and the pool model as one where tenants share resources. The Lens calls shared resources the classic form of multi-tenancy, with economies of scale and easier management. The bridge model mixes the two. A product can pool its web tier and give each tenant its own application tier and storage, and the Lens notes that a service's regulatory profile or noisy-neighbour behaviour can push that service toward silo.

The AWS guidance for multi-tenant architectures puts the cost trade-off in one sentence for each end. Silo gives the strongest isolation at the highest cost and complexity, and pool costs least and isolates least. The same page maps the models onto the database tier.

Model What AWS says Database tier in AWS guidance Fits when
Silo Tenants get dedicated resources and keep a shared identity and operational experience A database instance per tenant A customer pays for dedicated infrastructure or a regulation demands it
Bridge A mix of silo and pool, chosen service by service; the guidance example shares the application stack A dedicated schema per tenant on a shared RDS instance One service holds sensitive data and the rest can share
Pool Tenants share resources Row-level security inside the database engine A self-serve product with many small tenants

How do you keep one tenant out of another tenant's rows?

Pool puts every tenant in the same tables, so a missing WHERE clause becomes a data leak. Row-level security moves the filter into the database. Our Supabase row-level security guide shows the Supabase version, and the examples here use PostgreSQL. AWS's guidance names row-level security as the pool-model mechanism at the database tier on RDS and Aurora.

We built a table named invoices with 1,000,000 rows spread across 1,000 tenants of 1,000 rows each, and a composite index on tenant_id and created_at. The table and its indexes take 117 MB. The application connects as a role named app_user, which owns nothing. The policy compares each row's tenant_id with a session variable that the application sets on every request.

alter table app.invoices enable row level security;

create policy tenant_isolation on app.invoices
  using (tenant_id = nullif(current_setting('app.current_tenant', true), '')::int);

-- per request, inside a transaction
set local app.current_tenant = '42';
Test Rows returned or result
Forgotten WHERE clause, row-level security off 1,000,000 rows, every tenant
Row-level security on, tenant 42 set, no WHERE clause 1,000 rows, all tenant 42
Row-level security on, no tenant set 0 rows
Insert a row for tenant 7 while tenant 42 is set Rejected: new row violates row-level security policy
Table owner role 1,000,000 rows
Role with BYPASSRLS 1,000,000 rows
Superuser 1,000,000 rows
Table owner after ALTER TABLE ... FORCE ROW LEVEL SECURITY 1,000 rows

The PostgreSQL documentation on row security policies states the bypass rules: superusers and roles with BYPASSRLS skip row security on every query, and table owners skip it unless you force it on the table. The same page says a table with row security enabled and no policy denies every row. Our policy had no WITH CHECK clause, and the cross-tenant insert failed. The documentation's example shows PostgreSQL reusing the USING expression as the check.

Does row-level security slow queries down?

The cost is small on an indexed query. We summed the invoice amounts for tenant 42 over 90 days and ran each variant with pgbench for 8 seconds, three rounds, one client over a local socket with a warm cache.

Variant Average latency over three rounds
Row-level security off, WHERE tenant_id = 42 0.113 to 0.116 ms
Row-level security on, WHERE tenant_id = 42 0.121 to 0.123 ms
Row-level security on, no tenant filter in the query 0.119 to 0.122 ms

The planner used the composite index in every variant. With no tenant filter in the query, the policy expression became the index condition. With an explicit filter, the policy ran as a one-time filter on top of the same index scan. The gap came to 0.007 to 0.008 ms. The PostgreSQL documentation calls a policy that reads the row's own values the simplest and best-performing case, and a sub-SELECT on another table can cost more. Our Postgres performance tuning guide shows how to read the plan on your own tables.

What breaks row-level security in practice?

  • The app connects as the owner or a superuser. Both skip every policy. Run the application as a role that owns nothing, and force row security on tables whose owner must obey the policy.
  • A session-level SET outlives the request. In our test, request one ran SET app.current_tenant = '42' on a connection, and request two reused the connection without setting a tenant. It saw all 1,000 rows of tenant 42. With SET LOCAL inside a transaction the setting cleared at commit, and request two saw 0 rows. A connection pool makes the first pattern easy to hit.
  • Whole-table operations and integrity checks skip policies. The PostgreSQL documentation lists TRUNCATE and REFERENCES as exempt, and says foreign key and unique checks bypass row security. A constraint error can reveal that a value exists in another tenant's data.
  • A policy that reads other tables. The documentation describes race conditions when a policy runs a sub-SELECT on another table. Keep the policy on a column in the same row.

Take the tenant id from the verified login token. A request field can carry any value a caller types. Files need the same care, which our guide to secure file uploads for SaaS covers.

What do AWS accounts and quotas change?

AWS allocates service quotas and request rate limits for each account. The AWS whitepaper on organising your environment lists the account as the default unit for cost allocation and as a boundary that limits the blast radius of a mistake. An account per tenant therefore spreads quota risk across tenants, and it multiplies the accounts your team must create and maintain.

Quotas shape small design choices. The S3 user guide sets the default at 10,000 general purpose buckets per account and points to the Service Quotas console for an increase. A bucket per tenant needs a quota increase before the 10,001st bucket, and buckets the account holds for other purposes count toward the same limit. A prefix per tenant inside shared buckets avoids the limit and moves isolation into the credentials you issue.

The SaaS Lens page on preventing cross-tenant access describes the same split for Lambda. A function and execution role per tenant gives silo-style isolation, and AWS warns it can be hard to manage and can reach account limits. A shared function reads the tenant from a JWT and asks AWS STS for credentials scoped to that tenant, which puts part of the isolation model into your code. The AWS SaaS Architecture Fundamentals whitepaper, which AWS now marks as historical reference, adds that passing authentication and authorisation does not stop a user from reaching another tenant's resources, so a login check cannot isolate tenants.

What does a schema per tenant cost to run?

We created 1,000 schemas, each with an invoices table that has a primary key and one extra index, in a fresh database. Creating all of them took 1.2 to 1.8 seconds across two runs. The catalog grew from 396 relations to 6,396, which is six for each tenant: a table, a sequence, two indexes, and a TOAST table with its index. The empty database took 52 MB. A pg_dump of that database's schema took 1.2 seconds, against 0.08 seconds for the single-table database from the row-level security test.

Migration 1,000 tenant schemas One shared table
Add a nullable column 36 to 42 ms in one DO block, 0.10 s as 1,000 separate statements 0.57 ms
Create an index 272 to 295 ms Not run

Those tables held no rows, so the numbers show the fan-out and none of the data work. An index build grows with table size. The larger cost is operational: one deploy becomes 1,000 statements to track, and you must plan the rollback for the day tenant 612 fails halfway. Keep a migration record for each schema before you pick this model.

How do tiers change the cost?

The tier-based isolation page of the SaaS Lens describes a Silver tier on pooled resources and a Premium tier in a dedicated silo at a higher price. AWS notes that some providers do not publish the premium option, to limit how many customers choose it. The page advises running premium tenants on the same product version as everyone else, so the silo is a clone of the pooled environment. It warns that if too many tenants land in the silo tier, you drift back to operating one environment per tenant.

Which model fits which stage on AWS?

Our guide to multi-tenant SaaS architecture walks through the stage-by-stage choice for the database models. These are the AWS-specific moves that come after it.

  • First regulated or enterprise buyer: keep the pool for everyone else and stamp a silo for that tenant from the same code, priced as a contract with a floor.
  • One loud tenant: move that tenant to its own resources. The AWS guidance suggests placing high-traffic tenants on siloed infrastructure and quieter ones in bridge or pool.
  • A contract that demands an account of its own: weigh the extra quota headroom and blast-radius limit against the work of running one more account.
  • Hundreds of dedicated environments: invest in automation that creates and upgrades them before the contracts arrive.

Common mistakes

  • Connecting the application as the table owner, which lets every query skip the policy.
  • Using SET instead of SET LOCAL behind a connection pool.
  • Trusting a tenant id sent in a request body.
  • Planning a bucket or account for each tenant without reading the quota page first.
  • Building a silo for each tenant before any buyer asks for one.

Frequently asked questions

What is multi-tenant architecture on AWS?

It is a design where one deployment serves many customers while each customer's data stays separate. AWS describes silo and pool as the two ends and bridge as the mix between them, and a real product often mixes them by service and by customer tier.

Should a startup use silo or pool?

Start with pool, because one stack and one migration path suit a small team. Add a silo for a specific tenant when a contract or regulation requires it, and run it on the same code.

Is row-level security enough to isolate tenants?

It protects rows in one database and nothing else. Files and caches need their own tenant scoping, and the application must set the tenant from the verified token. Our tests show how an owner role or a leaked session setting defeats the policy.

Does row-level security work on RDS and Aurora PostgreSQL?

AWS's guidance names it as the pool-model mechanism for those engines. We tested on PostgreSQL 14.20 on a laptop, so confirm the behaviour and the timings on your own engine version.

How many tenants can one AWS account hold?

No single number applies. The limit comes from the service quotas of the services you use. S3 allows 10,000 general purpose buckets per account by default, and other services publish their own quotas in the Service Quotas console.

Where to start this week

  1. Write down which tenant data sits in which store, and mark each store as pool or silo today.
  2. Connect the application as a role that owns nothing and test a query with no tenant filter.
  3. Move tenant context into SET LOCAL inside a transaction, and add a test that fails when a request skips it.
  4. Read the Service Quotas page for every AWS service in your path and note the first limit you would reach at 1,000 tenants.

If you want senior engineers to design the tenancy model and build it on AWS, AlgoSmiths works on fixed-price projects with a working demo every week. Our SaaS product engineering covers authentication and billing from the first release.

Topic: Backend, data & architecture