Home icon

Building a multi-Region API with Prisma ORM and Amazon Aurora DSQL

Database Blog



This article demonstrates how to build a multi-Region active-active API using Prisma ORM and Amazon Aurora DSQL, enabling both Regions to accept reads and writes simultaneously with strong consistency.

  • Amazon Aurora DSQL is a serverless distributed SQL database supporting active-active multi-Region deployments with IAM authentication
  • Prisma schema requires three adjustments: relationMode="prisma" for app-level referential integrity, gen_random_uuid() for primary keys, and async index creation
  • MultiRegionDsqlClient establishes verified connections to both Regions at startup and provides in-process failover without restarts
  • withFailover() wrapper catches connectivity errors (ECONNREFUSED, ETIMEDOUT, unavailable) and retries against the secondary Region
  • Deploy application instances in multiple Regions with Route 53 latency-based routing directing traffic to the nearest endpoint
  • IAM token-based authentication eliminates static passwords; scope permissions to specific cluster ARNs for security

This pattern enables truly active-active global applications where both Regions accept writes with strong consistency, eliminating traditional active-passive limitations.



Go to article

The AWS News Feed is currently looking for gold sponsors. If you want to support the AWS community and reach a large audience of AWS professionals, consider sponsoring the AWS News Feed.

Related articles

Jul 28
2026
Building scalable applications on Amazon Aurora DSQL
Jun 24
2026
Build a Spring Boot REST API with Amazon Aurora DSQL
Jul 1
2024
Use Amazon Aurora Global Database to build resilient multi-Region applications
Jan 6
2026
Implement multi-Region endpoint routing for Amazon Aurora DSQL

The AWS News Feed is currently looking for silver sponsors. If you want to support the AWS community and reach a large audience of AWS professionals, consider sponsoring the AWS News Feed.