This repository contains code examples that demonstrate how to use the Aurora DSQL.
To get started with Aurora DSQL, create clusters and more information, please refer to AWS Documentation
The subdirectories contain code examples for connecting and using Aurora DSQL in each programming language and ORM framework, as well as end-to-end sample applications. The examples demonstrate the most common uses, such as installing clients, handling authentication, performing CRUD operations, and more. Please refer to the documentation for a full list of differences and limitations.
| Language | Client / ORM |
|---|---|
| C++ | libpq |
| C# (dotnet) | EF Core |
| C# (dotnet) | Npgsql |
| Go | pgx |
| Java | HikariCP + pgJDBC |
| Java | Liquibase |
| Java | Spring Boot |
| JavaScript | AWS Lambda + node-postgres |
| JavaScript | node-postgres (standalone) |
| JavaScript | Postgres.js |
| JavaScript | Sequelize |
| Python | asyncpg |
| Python | Jupyter |
| Python | psycopg |
| Python | psycopg2 |
| Python | SQLAlchemy |
| Python | Tortoise ORM |
| Ruby | pg |
| Ruby | Rails |
| Rust | sqlx |
| Typescript | Drizzle |
| Typescript | Prisma |
| Typescript | Sequelize |
| Typescript | TypeORM |
| Deno | postgres-js |
For new Flyway schema migrations, prefer a compatible released version of the official
org.flywaydb:flyway-database-dsql
community module. Existing users of the AWS adapter can follow its
migration guidance.
| Language | Cluster Management |
|---|---|
| C++ | cluster_management |
| C# (dotnet) | cluster_management |
| Go | cluster_management |
| Java | cluster_management |
| JavaScript | cluster_management |
| Python | cluster_management |
| Ruby | cluster_management |
| Rust | cluster_management |
| Language | Token Generation |
|---|---|
| CLI | generate_token |
| C++ | generate_token |
| C# (dotnet) | generate_token |
| Go | generate_token |
| Java | generate_token |
| JavaScript | generate_token |
| Python | generate_token |
| Ruby | generate_token |
| Rust | generate_token |
| Sample Applications |
|---|
| Amazon Aurora DSQL Agent — A sample application showing how to build an AI agent that queries Aurora DSQL using natural language, powered by Strands Agents, Bedrock AgentCore Gateway (MCP), and AgentCore Runtime (A2A) |
| Application development with the Aurora DSQL Kiro power — A four-prompt walkthrough showing how Kiro uses Aurora DSQL guidance and a read-only MCP connection to plan a data layer and generate a local application from synthetic manufacturing data |
| Booking API (Deno) — A sample REST API for room/resource bookings built with Deno.serve() and postgres.js via the Aurora DSQL connector. Includes OCC retry handling, unique-window enforcement via an async index, and pooled IAM token auth |
| Employee Directory API (Rust Lambda) — A serverless employee lookup API using AWS Lambda, API Gateway, and the Aurora DSQL SQLx connector |
Each example includes instructions for running the sample or following its walkthrough.
See CONTRIBUTING for more information.
This project is licensed under the MIT-0 License.