Skill 2.3.6

Implement data access patterns for multi-tenant applications

Key Concepts

In the silo model each tenant gets separate resources, such as its own table, bucket or account, which gives strong isolation at higher cost. In the pool model tenants share resources and every item carries a tenant ID, for example as the DynamoDB partition key prefix or an S3 prefix, which is cheaper but relies on correct access controls.

In pooled designs, isolation should be enforced by AWS rather than only by application code. A common pattern assumes a role with session tags or a scoped-down session policy for the current tenant, so IAM conditions such as dynamodb:LeadingKeys or S3 prefixes using ${aws:PrincipalTag/tenant} restrict access. Relational databases can use row-level security, and per-tenant KMS keys can separate encrypted data.