Skill 1.1.13
Design multi-tenant architectures that use tenant isolation patterns (for example, siloed or pooled resources, Amazon Cognito tenant context, row-level security, tenant-specific encryption).
Key Concepts
In the silo model each tenant has dedicated resources, such as its own account, database or stack, which gives the strongest isolation and simple per-tenant cost but the highest cost and operational effort. In the pool model tenants share resources, which is cheapest and easiest to operate but needs isolation enforced in every request. The bridge model mixes them, for example pooled compute with siloed databases, or premium tenants in silos.
Isolation in a pooled design starts with tenant context: Amazon Cognito puts the tenant ID in a token claim, and every service reads it from the token, never from the request body. The service then assumes a role with an IAM session tag for the tenant so policies allow only that tenant's DynamoDB partition keys or S3 prefixes; databases enforce row-level security on a tenant column (for example PostgreSQL RLS policies); and tenant-specific KMS keys separate encryption, allowing a tenant's data to be cryptographically erased. API Gateway usage plans per tenant tier limit noisy neighbours.