# Building a multi-tenant CRM with Amazon Aurora DSQL

DevFeed: [Building a multi-tenant CRM with Amazon Aurora DSQL](<https://devfeed.tech/articles/building-a-multi-tenant-crm-with-amazon-aurora-dsql-129582.md>)

Original publisher: [Read original article](<https://aws.amazon.com/blogs/database/building-a-multi-tenant-crm-with-amazon-aurora-dsql/>)

Author: Aishwarya Sawant

Published: 2026-11-11T21:16:45Z

Content type: tutorial

Language: en

Sources: [AWS Database Blog](<https://devfeed.tech/sources/aws-database-blog.md>)

Topics: [DSQL](<https://devfeed.tech/topics/dsql.md>), [tenant data protection](<https://devfeed.tech/topics/tenant-data-protection.md>)

Tags: [advanced-300](<https://devfeed.tech/tags/advanced-300.md>), [amazon-aurora](<https://devfeed.tech/tags/amazon-aurora.md>), [amazon-elastic-container-service](<https://devfeed.tech/tags/amazon-elastic-container-service.md>), [aws-identity-and-access-management-iam](<https://devfeed.tech/tags/aws-identity-and-access-management-iam.md>), [crm](<https://devfeed.tech/tags/crm.md>), [dsql](<https://devfeed.tech/tags/dsql.md>), [ecs](<https://devfeed.tech/tags/ecs.md>), [proof-of-concept](<https://devfeed.tech/tags/proof-of-concept.md>), [technical-how-to](<https://devfeed.tech/tags/technical-how-to.md>), [tenancy](<https://devfeed.tech/tags/tenancy.md>), [tenant-isolation](<https://devfeed.tech/tags/tenant-isolation.md>)

## AI overview

The article's main security requirement is to derive tenant identity from a verified token claim and apply that tenant ID to every repository query. Its CRM proof of concept uses one shared schema with tenant_id on each tenant-scoped row; this is simple to onboard and scales with workload, but isolation depends on the application. Cluster-per-tenant offers stronger isolation at the cost of per-tenant endpoints, grants, and migrations; schema-per-tenant is limited by Aurora DSQL's current 10-schema maximum. The implementation uses UUID keys with tenant-leading indexes, application checks to ensure referenced accounts belong to the same tenant, and an IAM-authenticated connector with connections retired before the one-hour limit. Aurora DSQL requires separate transactions for DDL statements, while standalone indexes build asynchronously. Writes use optimistic concurrency control: transaction callbacks retry serialization conflicts and must be idempotent. Bulk writes should be batched to stay within the 3,000-row, 10 MiB, and five-minute transaction limits. The article also notes that Aurora DSQL does not support row-level security.

## Source excerpt

Learn how to design and implement a multi-tenant CRM on Amazon Aurora DSQL using the pooled tenancy model. Tenant isolation is enforced in a centralized data-access layer, with Aurora DSQL-specific design considerations, and a working proof of concept you can deploy on Amazon ECS Express Mode.