Preview Support for Amazon Aurora is Now Available in RepoDB

We are excited to announce the preview release of Amazon Aurora support for RepoDB. It brings our hybrid ORM’s fluent CRUD, batch, raw-SQL and Bulk Operations to both Aurora editions, Aurora PostgreSQL-Compatible and Aurora MySQL-Compatible.

Why Amazon Aurora?

Amazon Aurora is AWS’s managed relational database for the cloud. It separates compute from a distributed storage layer that replicates across availability zones, and it supports fast failover, read replicas, and IAM-based authentication. Many .NET teams on AWS run their production workloads on it.

To get the most out of Aurora, a client has to be aware of the cluster. It needs to reconnect quickly to the new writer after a failover, send reads to replicas, and authenticate with IAM or AWS Secrets Manager. AWS provides these features in the AWS Advanced .NET Data Provider Wrapper, not in the plain Npgsql or MySqlConnector drivers. We built these providers so .NET teams get the RepoDB experience on top of that wrapper.

How RepoDB helps

  • Less plumbing. You get typed entities, expression-based queries and automatic mapping, and you can still drop down to raw SQL whenever you need to.
  • The Aurora features of the AWS wrapper. Fast failover, read/write splitting, IAM authentication and AWS Secrets Manager authentication are switched on through the connection string, and RepoDB handles the rest.
  • SQL written for each engine. Aurora PostgreSQL uses RETURNING for identities, INSERT ... ON CONFLICT for merges and LIMIT/OFFSET for paging. Aurora MySQL reads InsertAll identities back with VALUES ROW(...).
  • Fast bulk loading. Bulk Operations write through AuroraDbBulkCopy. On PostgreSQL it uses Npgsql’s binary COPY, and on MySQL it uses LOAD DATA LOCAL INFILE.
  • One API across databases and editions. Both editions use the same class names and the same UseAuroraDb() call. You use the same programming model as our SQL Server, PostgreSQL, MySQL, SQLite, Oracle, DB2, MariaDB, Firebird, ClickHouse, Vertica, SAP HANA, EnterpriseDB, DuckDB and CockroachDB extensions.

Each edition has its own provider and Bulk Operations package, and each is built on its own connector from our RepoDB Connectors project:

Edition Provider Bulk Operations Connector
Aurora PostgreSQL RepoDb.AuroraDb.PostgreSql RepoDb.AuroraDb.PostgreSql.BulkOperations RepoDb.Connector.AuroraDb.Npgsql
Aurora MySQL RepoDb.AuroraDb.MySqlConnector RepoDb.AuroraDb.MySqlConnector.BulkOperations RepoDb.Connector.AuroraDb.MySqlConnector

Getting started

Install the packages for your edition. For Aurora PostgreSQL:

> Install-Package RepoDb.AuroraDb.PostgreSql -Version 0.0.1-alpha
> Install-Package RepoDb.AuroraDb.PostgreSql.BulkOperations -Version 0.0.1-alpha

For Aurora MySQL:

> Install-Package RepoDb.AuroraDb.MySqlConnector -Version 0.0.1-alpha
> Install-Package RepoDb.AuroraDb.MySqlConnector.BulkOperations -Version 0.0.1-alpha

Initialize it once at startup. The call is the same for both editions:

GlobalConfiguration
    .Setup()
    .UseAuroraDb();

The samples below use a connection string that points to your cluster endpoint. The AWS wrapper plugins are switched on through the Plugins setting:

var connectionString = "Server=my-cluster.cluster-xxxx.us-east-1.rds.amazonaws.com;Port=5432;Database=RepoDb;User Id=postgres;Password=...;Plugins=failover,efm;";

For Aurora MySQL, use port 3306 and your MySQL user. Otherwise, the samples work the same way for both editions. For a complete walkthrough, follow the Get Started with AuroraDB tutorial.

CRUD

Insert

using var connection = new AuroraDbConnection(connectionString);
var person = new Person { Name = "John Doe", Age = 30, CreatedDateUtc = DateTime.UtcNow };
var id = connection.Insert(person);

Query

using var connection = new AuroraDbConnection(connectionString);
var person = connection.Query<Person>(e => e.Id == 10045).FirstOrDefault();

Update

using var connection = new AuroraDbConnection(connectionString);
var person = connection.Query<Person>(e => e.Id == 10045).FirstOrDefault();
person.Age = 31;
var updatedRows = connection.Update(person);

Merge

using var connection = new AuroraDbConnection(connectionString);
var person = new Person { Id = 10045, Name = "John Doe", Age = 32, CreatedDateUtc = DateTime.UtcNow };
var id = connection.Merge(person);

Delete

using var connection = new AuroraDbConnection(connectionString);
var deletedRows = connection.Delete<Person>(10045);

Batch Operations

The InsertAll, UpdateAll, MergeAll and DeleteAll operations send multiple rows per round-trip. The number of rows per round-trip is controlled by batchSize.

InsertAll

The generated identities are set back on the entities.

using var connection = new AuroraDbConnection(connectionString);
var people = GetPeople(1000);
var insertedRows = connection.InsertAll(people, batchSize: 100);

UpdateAll

using var connection = new AuroraDbConnection(connectionString);
var people = connection.Query<Person>(e => e.Age < 18).AsList();
people.ForEach(p => p.Age += 1);
var updatedRows = connection.UpdateAll(people, batchSize: 100);

MergeAll

using var connection = new AuroraDbConnection(connectionString);
var people = GetPeople(1000);
var mergedRows = connection.MergeAll(people, batchSize: 100);

DeleteAll

using var connection = new AuroraDbConnection(connectionString);
var people = connection.Query<Person>(e => e.Age > 100);
var deletedRows = connection.DeleteAll(people);

Bulk Operations

Bulk operations come from the edition’s BulkOperations package. They load rows through AuroraDbBulkCopy, then apply the changes with set-based statements.

BulkInsert

Use ReturnIdentity to get the generated identities back on the entities.

using var connection = new AuroraDbConnection(connectionString);
var people = GetPeople(100000);
var insertedRows = connection.BulkInsert(people,
    identityBehavior: AuroraDbBulkImportIdentityBehavior.ReturnIdentity);

BulkUpdate

using var connection = new AuroraDbConnection(connectionString);
var people = GetPeopleToUpdate();
var updatedRows = connection.BulkUpdate(people);

BulkMerge

using var connection = new AuroraDbConnection(connectionString);
var people = GetPeopleToMerge();
var mergedRows = connection.BulkMerge(people, qualifiers: e => new { e.Name });

BulkDelete

using var connection = new AuroraDbConnection(connectionString);
var people = GetPeopleToDelete();
var deletedRows = connection.BulkDelete(people);

BulkDeleteByKey

using var connection = new AuroraDbConnection(connectionString);
var deletedRows = connection.BulkDeleteByKey("Person", new object[] { 10045, 10046, 10047 });

Every operation also has an Async counterpart. See the Bulk Operations pages for Aurora PostgreSQL and Aurora MySQL for the details.

A preview, not a final release

The RepoDb.AuroraDb.* packages are previews at v0.0.1-alpha, and their APIs and behavior may change before a stable release. The connectors underneath are also prereleases, and all packages require .NET 8.0 or later. Three things are worth knowing up front:

  • One edition per project. Both providers declare the same type names, including UseAuroraDb(), so one project cannot reference both. If your application talks to both editions, put each provider in its own project or use extern alias.
  • Aurora MySQL version 3 is required. VALUES ROW(...) needs MySQL 8.0.19 or later, so Aurora MySQL version 2 is not supported.
  • TransactionScope on Aurora PostgreSQL. The AWS wrapper checks for Aurora every time a connection opens. On a plain PostgreSQL server that check fails and aborts the ambient transaction. Explicit transactions through BeginTransaction() are not affected.

The test suites run against standard PostgreSQL and MySQL 8.0 containers, not yet against a real Aurora cluster. Aurora PostgreSQL passes 1,042 of 1,048 tests, and its Bulk Operations pass 628 of 629. The rest are TransactionScope tests that need a real cluster. Aurora MySQL passes all 900. The limitations pages for Aurora PostgreSQL and Aurora MySQL cover the rest.

We would love to hear your feedback, especially if you run it against a real Aurora cluster. It directly shapes what we prioritize on the way to general availability.


~ Conceptualized by me. Reviewed and checked by AI. Refined and gatekept by me. ~

Please support us

Give a ⭐ to our Github repository | Follow me at X / Twitter | Connect with us at our official Teams Channel
Apache License 2.0 — Copyright © 2026 by Michael Camara Pendon / Create a Request