Serverless applications with Aurora DSQL as a database of choice- AWS Community Day NL 2025.pdf

VadymKazulkin 0 views 85 slides Oct 08, 2025
Slide 1
Slide 1 of 85
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31
Slide 32
32
Slide 33
33
Slide 34
34
Slide 35
35
Slide 36
36
Slide 37
37
Slide 38
38
Slide 39
39
Slide 40
40
Slide 41
41
Slide 42
42
Slide 43
43
Slide 44
44
Slide 45
45
Slide 46
46
Slide 47
47
Slide 48
48
Slide 49
49
Slide 50
50
Slide 51
51
Slide 52
52
Slide 53
53
Slide 54
54
Slide 55
55
Slide 56
56
Slide 57
57
Slide 58
58
Slide 59
59
Slide 60
60
Slide 61
61
Slide 62
62
Slide 63
63
Slide 64
64
Slide 65
65
Slide 66
66
Slide 67
67
Slide 68
68
Slide 69
69
Slide 70
70
Slide 71
71
Slide 72
72
Slide 73
73
Slide 74
74
Slide 75
75
Slide 76
76
Slide 77
77
Slide 78
78
Slide 79
79
Slide 80
80
Slide 81
81
Slide 82
82
Slide 83
83
Slide 84
84
Slide 85
85

About This Presentation

Amazon Aurora DSQL is a serverless distributed SQL database with virtually unlimited scale, highest availability, and zero infrastructure management. In this talk we’ll use a sample serverless application that uses Amazon API Gateway, AWS Lambda and Aurora DSQL to explore the architecture and feat...


Slide Content

Serverless applications with Aurora DSQL
as a database of choice
Vadym Kazulkin, ip.labs , AWS Community Day NL , September 24 2025

Vadym Kazulkin
ip.labs GmbH Bonn, Germany
Co-Organizer of the Java User Group Bonn
[email protected]
@VKazulkin
https://dev.to/vkazulkin
https://github.com/Vadym79/
https://de.slideshare.net/VadymKazulkin/
https://www.linkedin.com/in/vadymkazulkin
https://www.iplabs.de/
Contact

Image: burst.shopify.com/photos/a-look-across-the-landscape-with-view-of-the-sea
About ip.labs

Serverless applications with Aurora DSQL as a database of choice
Agenda
▪Why we need another (Serverless) database?
▪Introducing Aurora DSQL
▪Architecture of Aurora DSQL
▪How to create single and multi-region clusters in Aurora DSQL
▪Authentication and authorization in Aurora DSQL
▪Code examples of how to connect Aurora DSQL from Lambda
▪Performance measurements of CRUD operations in Aurora DSQL
▪Pricing of Aurora DSQL
▪Currently unsupported features and constraints in Aurora DSQL
▪How to talk to Aurora DSQL MCP Server via Strands SDK

Serverless applications with Aurora DSQL as a database of choice
Why we need another (Serverless)
database?

Serverless applications with Aurora DSQL as a database of choice
Current AWS Database Offerings NoSQL And Relational For
The Serverless Workloads
DynamoDB RDS Aurora
Aurora
Serverless v2

Serverless applications with Aurora DSQL as a database of choice
Strengths and weaknesses of these
Amazon databases when using in the
Serverlessarchitectures (especially
connecting from AWS Lambda)

Serverless applications with Aurora DSQL as a database of choice
DynamoDB
Completely Serverless
▪Doesn’t generally**require infrastructure management (VPC, security
groups, subnets)
▪Scales down to zero (including pay as use go pricing)
NoSQL databases require investment in knowledge
Limited strong consistency and transaction support
Challenging to change the table design / query patterns
afterwards
** requires putting Lambda into VPC when using DAX for caching

Serverless applications with Aurora DSQL as a database of choice
RDS
Requires a lot of infrastructure management (VPC, security
groups, subnets)
No auto-scaling out of the box for compute and storage
No per pay use pricing
Issues with database connection management (requires RDS
Proxy)

Serverless applications with Aurora DSQL as a database of choice
Aurora (Provisioned)
Storage scales automatically
Requires a lot of infrastructure management (VPC, security
groups, subnets)
No auto-scaling out of the box for compute
No per pay use pricing
Issues with database connection management (requires
Amazon RDS Proxy service)

Serverless applications with Aurora DSQL as a database of choice
Aurora Serverless v2
Compute and storage scale automatically (also down to zero)
Doesn’t generally**require infrastructure management (VPC,
security groups, subnets)
When auto-scaling, it doubles the capacity (ACU)
Scales down to zero but when it is slow to scale up
Issues with database connection management (requires
Amazon RDS Proxy service or Data API)
** requires putting Lambda into VPC when using RDS Proxy

Serverless applications with Aurora DSQL as a database of choice
Can’t we have AWS database offering
which is as Serverless as DynamoDB but
provides the benefits (like ACID) of the
relational databases?

Serverless applications with Aurora DSQL as a database of choice
https://aws.amazon.com/rds/aurora/dsql/?nc1=h_ls
Introducing Aurora DSQL

Serverless applications with Aurora DSQL as a database of choice
https://docs.aws.amazon.com/aurora-dsql/latest/userguide/what-is-aurora-dsql.html
What Is Aurora DSQL?
▪Aurora DSQL is a serverless, distributed relational database
service optimized for transactional workloads
▪Aurora DSQL offers virtually unlimited scale and doesn't require
you to manage infrastructure
▪The active-active highly available architecture provides 99.99%
single-Region and 99.999% multi-Region availability
▪Strongly consistent at any scale and in multi-region configuration

Serverless applications with Aurora DSQL as a database of choice
https://docs.aws.amazon.com/aurora-dsql/latest/userguide/what-is-aurora-dsql.html
When To Use Aurora DSQL?
▪Aurora DSQL is optimized for transactional workloads that benefit
from ACID transactions and a relational data model.
▪Because it's serverless, Aurora DSQL is ideal for application
patterns of microservice, serverless, and event-driven
architectures.
▪Aurora DSQL is PostgreSQL-compatible, so you can use familiar
drivers, object-relational mappings (ORMs), frameworks, SQL
features and tools (like PSQL and DBeaver).

Serverless applications with Aurora DSQL as a database of choice
https://brooker.co.za/blog/2024/12/05/inside-dsql-writes.html
Architecture of Aurora DSQL

Serverless applications with Aurora DSQL as a database of choice
https://aws.amazon.com/blogs/database/introducing-amazon-aurora-dsql/
Single-Region Aurora DSQL Cluster
Highly available architecture
provides 99.99% single-Region
availability.

Serverless applications with Aurora DSQL as a database of choice
https://aws.amazon.com/blogs/database/introducing-amazon-aurora-dsql/
Multi-Region Aurora DSQL Cluster
Active-active highly available
architecture provides 99.999%
multi-Region availability.

Serverless applications with Aurora DSQL as a database of choice
https://aws.amazon.com/blogs/database/introducing-amazon-aurora-dsql/
Multi-Region Aurora DSQL Cluster
•Aurora DSQL creates another
cluster in a different Region and
links them together.
•Adding linked Regions makes sure
that all changes from committed
transactions are replicated to the
other linked Regions.
•Each linked cluster has a Regional
endpoint, and Aurora DSQL
synchronously replicates writes
across Regions, enabling strongly
consistent reads and writes from
any linked cluster.

Serverless applications with Aurora DSQL as a database of choice
https://aws.amazon.com/blogs/database/introducing-amazon-aurora-dsql/
Multi-Region Aurora DSQL Cluster
•A third Region acts as the witness
Region.
•The witness Region receives the
data written to linked clusters but
doesn’t have a cluster or an
associated endpoint.
•It stores a limited window of
encrypted transaction logs (in
Journal), which Aurora DSQL uses
to provide multi-Region durability
and availability.

Serverless applications with Aurora DSQL as a database of choice
https://brooker.co.za/blog/2024/12/05/inside-dsql-writes.html
Aurora DSQL Optimistic Concurrency Control (OCC)
▪OCC is a concurrency control method that assumes conflicts between
transactions are rare and avoids using locks to manage access to data.
▪Instead, it allows transactions to proceed without locking, and checks for
conflicts only at the time of commit.
▪Snapshot isolation used in Aurora DSQL (equivalent to PostgreSQL’s
REPEATABLE READ) is a form of OCC that provides each transaction with a
consistent snapshot of the database at the time the transaction started.
▪If a conflict is detected the transaction is rolled back and retried.
▪At snapshot isolation level, OCC aborts will only occur when two or more
concurrent transactions attempt to writethe same keys.

Serverless applications with Aurora DSQL as a database of choice
https://brooker.co.za/blog/2024/12/04/inside-dsql.html https://marc-bowes.com/dsql-scales-to-zero.html
Query Processor
•Each DSQL query processor (QP)
is an independent unit, that never
communicates with other QPs.
•Each QP is a PostgreSQL process
running inside a Firecracker
MicroVM.
•When you connect to DSQL,
DSQL will assign a separateQP to
that connection.
•QPs are used multiple times (for
the same DSQL database), but
only handle one transaction at a
time.

Serverless applications with Aurora DSQL as a database of choice
https://brooker.co.za/blog/2024/12/04/inside-dsql.html https://marc-bowes.com/dsql-circle-of-life.html
Aurora DSQL Reads
•Reads in DSQL are done using a
multiversionconcurrency control
(MVCC), allowing them to scale
out across many replicas of many
storage shards, and across a
scalable SQL layer, with no
contention or coordination
between other readers and
writers.
•Reads are always local.

Serverless applications with Aurora DSQL as a database of choice
https://brooker.co.za/blog/2024/12/04/inside-dsql.html https://marc-bowes.com/dsql-circle-of-life.html
Aurora DSQL Writes
•The writes proceed in a similar
way: executing the
INSERT/UPDATE/DELETE simply
writes down a planned change
locally inside the Query Processor
(QP) that’s running this
transaction.
•No replication, durability, or writes
to storage have occurred yet.

Serverless applications with Aurora DSQL as a database of choice
https://brooker.co.za/blog/2024/12/04/inside-dsql.html https://marc-bowes.com/dsql-circle-of-life.html
Aurora DSQL Writes
When executing COMMIT:
•Check whether our isolation rules
will allow it to be committed
•Make the results of the
transaction durable (the Din
ACID) and atomically (the Ain
ACID).
•Replicate the transaction to all
AZs and regionswhere it needs to
be visible to future transactions.

Serverless applications with Aurora DSQL as a database of choice
https://brooker.co.za/blog/2024/12/04/inside-dsql.htmlhttps://marc-bowes.com/dsql-circle-of-life.html
https://aws.amazon.com/blogs/compute/its-about-time-microsecond-accurate-clocks-on-amazon-ec2-instances/
Aurora DSQL Writes
•We pick a start time for our
transaction at begin transaction.
•We pick a commit timefor our
transaction at commit transaction.
•Time comes from EC2 Time Sync.
•We need to know if, for every key
this transaction wants to write,
any other transaction wrote the
same key between start and
commit time.
•Task of looking for conflicts is
implemented in a service called
Adjudicator.

Serverless applications with Aurora DSQL as a database of choice
https://brooker.co.za/blog/2024/12/04/inside-dsql.html https://marc-bowes.com/dsql-circle-of-life.html
Aurora DSQL Writes
•Once the Adjudicator confirms a
transaction, it gets written on the
Journal for replication.
•Journal is an internal AWS
component optimized for ordered
data replication across hosts, AZs,
and regions. Journal provides an
ordered stream of time and data.
•At this point, the transaction is
committed: it’s durable, it’s put in
order, all consistency and
isolation checks have passed, and
it can no longer be rejected.

Serverless applications with Aurora DSQL as a database of choice
https://brooker.co.za/blog/2024/12/04/inside-dsql.html https://marc-bowes.com/dsql-circle-of-life.html
Aurora DSQL Writes
•Journal (replicated transaction
log) starts applying the results of
the transaction to all the relevant
storage replicas (making new
versions of rows as they come in).
•As Journal provides an ordered
stream of time and data, the
storage knows whether all journal
data has been replicated yet.
•Storage follows the journal and
keeps (each millisecond) itself up
to date.

Serverless applications with Aurora DSQL as a database of choice
https://brooker.co.za/blog/2024/12/04/inside-dsql.html
Aurora DSQL Components Scalability
•Query Processor, Adjudicator,
Journal and Storage are
independently horizontally
scalable, most of them are
shared-nothing.
•This approach is enabled by the
extremely fast and reliable
networking available in modern
data centers.

Serverless applications with Aurora DSQL as a database of choice
https://aws.amazon.com/blogs/database/introducing-amazon-aurora-dsql/
Multi-Region Aurora DSQL Cluster
•Independent clusters (Query
Processor, Adjudicator, Storage)
are completely separated.
•Only journal (replicated
transaction log) is shared
between the clusters and the
witness region.

Serverless applications with Aurora DSQL as a database of choice
https://docs.aws.amazon.com/aurora-dsql/latest/userguide/disaster-recovery-resiliency.html
Aurora DSQL Resilience Aspects
▪Backup and restore
▪Supports backup and restore with AWS Backup console. You can perform a
full backup and restore for your single-Region and multi-Region clusters.
▪AWS Fault Injection Service (FIS) supports the following Aurora DSQL
action:
▪aws:dsql:cluster-connection-failure
▪Creates controlled connection failures in an Aurora DSQL cluster for a
specified duration to test application resilience.

Serverless applications with Aurora DSQL as a database of choice
https://aws.amazon.com/rds/aurora/dsql/?nc1=h_ls
How to create single and multi-region
clusters in Aurora DSQL

Serverless applications with Aurora DSQL as a database of choice
Clusters | Aurora DSQL | us-east-1
How To Create A Single-Region Aurora DSQL Cluster

Serverless applications with Aurora DSQL as a database of choice
https://aws.amazon.com/rds/aurora/dsql/?nc1=h_ls
Authentication and authorizationin
Aurora DSQL

Serverless applications with Aurora DSQL as a database of choice
https://marc-bowes.com/dsql-auth.html
Authentication In Aurora DSQL
▪In DSQL, there are no passwords
▪Tokens are used to authenticatewho is trying to connect instead
▪Authentication tokens are generated by the AWS SDK using fast, local
cryptography and sent over the wire to DSQL (similar toS3 and DynamoDB
requests)
▪AWS Signature v.4 algorithm is a set of operations that involve Hash-based
Message Authentication Code(HMAC)
▪There are 2 APIs for the tokens which are named:
▪DbConnectAdmin
▪DbConnect

Serverless applications with Aurora DSQL as a database of choice
https://marc-bowes.com/dsql-auth.html
Authentication In Aurora DSQL
AWS CLI request:
awsdsqlgenerate-db-connect-admin-auth-token --hostname cluster-endpoint--
expires-in 10
AWS CLI response:
cluster-endpoint/?Action=DbConnectAdmin&X-Amz-Algorithm=AWS4-HMAC-
SHA256&X-Amz-Credential=xxxx&X-Amz-Date=20250516T003940Z&X-Amz-
Expires=60&X-Amz-SignedHeaders=host&X-Amz-Signature=xxxx

Serverless applications with Aurora DSQL as a database of choice
https://marc-bowes.com/dsql-auth.html
Authentication In Aurora DSQL
export PGPASSWORD=$(awsdsqlgenerate-db-connect-admin-auth-token --
hostname $cluster_endpoint)
psql–quiet --username admin --dbnamepostgres--host $cluster_endpoint

Serverless applications with Aurora DSQL as a database of choice
https://github.com/Vadym79/AWSLambdaJavaWithAmazonDSQL/tree/main/sample-app-with-pgjdbc
Code examples of how to connect Aurora
DSQL from Lambda

Serverless applications with Aurora DSQL as a database of choice
https://github.com/Vadym79/AWSLambdaJavaWithAmazonDSQL/blob/main/sample-app-with-pgjdbc
CREATE TABLE orders (id int PRIMARY KEY, user_idint
NOT NULL, total_valueint NOT NULL, status varchar
(255) NOT NULL, created timestamp );
CREATE TABLE order_items(id int PRIMARY KEY,
product_idint NOT NULL, order_idint NOT NULL,
value int NOT NULL, quantity int NOT NULL);
CREATE INDEX ASYNC order_created_idxON orders
(created);
CREATE INDEX ASYNC order_items_order_id_idxON
order_items(order_id);
Sample Application

Serverless applications with Aurora DSQL as a database of choice
https://github.com/Vadym79/AWSLambdaJavaWithAmazonDSQL/blob/main/sample-app-with-pgjdbc
Data model is oversimplified:
•we have only ordersand order_itemstables
•orderstable has user_idcolumn, but no
userstable is present
•order_itemstable has product_idcolumn,
but no producttable is present
Sample Application

Serverless applications with Aurora DSQL as a database of choice
https://github.com/Vadym79/AWSLambdaJavaWithAmazonDSQL/blob/main/sample-app-with-pgjdbc/template.yaml
Infrastructure As Code With AWS SAM

Serverless applications with Aurora DSQL as a database of choice
https://github.com/Vadym79/AWSLambdaJavaWithAmazonDSQL/blob/main/sample-app-with-pgjdbc/pom.xml
Required Dependencies (DSQL, Hikari Pool, PostgreSQL Driver)

Serverless applications with Aurora DSQL as a database of choice
https://github.com/Vadym79/AWSLambdaJavaWithAmazonDSQL/blob/main/sample-app-with-pgjdbc/src/main/java/software/amazonaws/example/order/dao/DsqlDataSourceConfig.java
Configuration Of The Hikari Data Source Pool In Java

Serverless applications with Aurora DSQL as a database of choice
https://github.com/awslabs/aurora-dsql-jdbc-connector
Aurora DSQL JDBC Connector
▪Automatic Token Generation
▪IAM tokens are generated automatically using AWS credentials
▪Seamless Integration
▪Works with existing JDBC connection patterns and with connection pooling
libraries such as HikariCP
▪The connector handles IAM token generation during connection establishment,
allowing connection pools to operate normally
▪AWS Credentials Support
▪Supports various AWS credential providers (default, profile-based, etc.)

Serverless applications with Aurora DSQL as a database of choice
https://github.com/Vadym79/AWSLambdaJavaWithAmazonDSQL/blob/main/sample-app-with-aurora-dsql-jdbc-connector/pom.xml
Required Dependencies for Aurora DSQL JDBC Connector

Serverless applications with Aurora DSQL as a database of choice
https://github.com/Vadym79/AWSLambdaJavaWithAmazonDSQL/blob/main/sample-app-with-aurora-dsql-jdbc-connector/src/main/java/software/amazonaws/example/order/dao/DsqlDataSourceConfig.java
Aurora DSQL JDBC Connector

Serverless applications with Aurora DSQL as a database of choice
https://github.com/Vadym79/AWSLambdaJavaWithAmazonDSQL/blob/main/sample-app-with-pgjdbc/src/main/java/software/amazonaws/example/order/dao/OrderDao.java
Implementation Of The Order DAO

Serverless applications with Aurora DSQL as a database of choice
https://docs.aws.amazon.com/aurora-dsql/latest/userguide/aws-sdks.html
ORM-Framework (Object-Relational Mapping) Support
▪Hibernate
▪SQLAlchemy
▪Django

Serverless applications with Aurora DSQL as a database of choice
Performance measurements of CRUD
operations in Aurora DSQL

Serverless applications with Aurora DSQL as a database of choice
https://www.postgresql.org/docs/current/pgbench.html https://wiki.postgresql.org/wiki/TPC-H https://marc-bowes.com/dsql-tpcb.html
▪Measure the Lambda function performance of each concrete
scenario
▪Lambda functions written in Java with managed Java 21 runtime connecting
to Aurora DSQL clusters (latency)
▪Focus only on the measuring Lambda warm start times
▪Up to 99% percentile, ignoring highly programming language (Java)
dependent 99,9% and max values
▪Perform the measurements for single-region and multi-region DSQL cluster
Goals Of The Aurora DSQL Performance Measurements

Serverless applications with Aurora DSQL as a database of choice
Goals Of The Aurora DSQL Performance Measurements
https://www.postgresql.org/docs/current/pgbench.html https://wiki.postgresql.org/wiki/TPC-H https://marc-bowes.com/dsql-tpcb.html
▪Different scenarios include:
▪CREATE an order with multiple (2) order items (in one transaction)
▪SELECT one order by primary key (id) and then SELECT order items for this order
using the index
▪SELECT multiple orders created in the specific date range using the index and
then SELECT order items for each of this order using the index
▪Take into the account the overhead of the programming language (Java),
database driver (JDBC) and database connection pooling framework (Hikari)

Serverless applications with Aurora DSQL as a database of choice
https://www.postgresql.org/docs/current/pgbench.html https://wiki.postgresql.org/wiki/TPC-H https://marc-bowes.com/dsql-tpcb.html
▪Compare the performance of Aurora DSQL database with other
Amazon databases
▪Aurora DSQL vs RDS vs Aurora vs Aurora Serverless v2
▪Measure the Aurora DSQL database performance itself using:
▪pgbench(TPC-B)
▪TPC-C/H benchmarks
Not Goals Of The Aurora DSQL Performance Measurements

Serverless applications with Aurora DSQL as a database of choice
Not Goals Of The Aurora DSQL Performance Measurements
https://www.postgresql.org/docs/current/pgbench.html https://wiki.postgresql.org/wiki/TPC-H https://marc-bowes.com/dsql-tpcb.html
▪Measure performance with stress test
▪Performance at scale
▪Performance when scaling (adding more storage, QPs, adjudicators)
▪Measure and optimize Lambda cold and warm start times with
Java
▪AWS Lambda SnapStartusage with priming techniques

64
▪Use Managed Amazon Corretto Java 21
Lambda runtime
▪Use pure JDBC and no ORM framework
(for example Hibernate) on top
▪Lambda has 1024 MB memory setting
▪Lambda uses x86 architecture
▪No Lambda SnapStart enabled
▪Info about the experiments:
▪Approx. 1 hour duration
▪Approx. first > 5.000 warm starts
Sample Application Settings

0,00
10,00
20,00
30,00
40,00
50,00
60,00
single-region cluster multi-region cluster
p50p75p90p99
create 1 order with 2 order items (3 inserts
in total) in the same transaction
ms

0,00
2,00
4,00
6,00
8,00
10,00
12,00
14,00
16,00
18,00
20,00
cluster
p50p75p90p99
get order by random id and then get its 2
items (2 selects)
ms

0,00
50,00
100,00
150,00
200,00
250,00
300,00
350,00
cluster
p50p75p90p99
get orders by random created date range (limited by 100
orders) and then get 2 items for each order (101 selects)
ms

163,00
164,00
165,00
166,00
167,00
168,00
169,00
170,00
single-region cluster multi-region cluster
value
average cold start of the database (\timing in psql) cluster
get order by random id (without order item) after 3 days of
inactivity
ms

Serverless applications with Aurora DSQL as a database of choice
https://aws.amazon.com/rds/aurora/dsql/?nc1=h_ls https://marc-bowes.com/dsql-how-to-spend-a-dollar.html
Pricing of Aurora DSQL

Serverless applications with Aurora DSQL as a database of choice
https://aws.amazon.com/rds/aurora/dsql/pricing/
Pricing Of Aurora DSQL
DimensionDescription Pricin
DPU DPU as a measure of how much work the system does
to run your SQL workload. This includes compute
resources used to execute query logic (e.g., joins,
functions, aggregations) as well as the input/output (I/O)
required to read from and write to storage
From $8.00 per
1M Units
Storage Storage is billed based on the total size of your
database, measured in GB-month.
From $0.33 per
GB-month
Others •Data transfer cost
•Backup and restore costs
•Free tier first100.000 DPUsand1 GB of
storageare free
See
https://aws.amaz
on.com/rds/auror
a/dsql/pricing/

Serverless applications with Aurora DSQL as a database of choice
Pricing CloudWatch Metrics For Aurora DSQL

Serverless applications with Aurora DSQL as a database of choice
Pricing CloudWatch Metrics For Aurora DSQL

Serverless applications with Aurora DSQL as a database of choice
https://docs.aws.amazon.com/aurora-dsql/latest/userguide/working-with-postgresql-compatibility.html https://docs.aws.amazon.com/aurora-dsql/latest/userguide/working-with-postgresql-compatibility-unsupported-features.html
Currently unsupported features and
constraints in Aurora DSQL

Quota Description Value Adjustable
Maximum
connections
Maximum number of connections
per cluster
10.000
Maximum transaction
time
Maximum duration of the
transaction
5 minutes
Maximum connection
duration
Maximum duration after which the
connection will be closed
60 minutes
Maximum number of
rows changed in
transaction
Maximum number of table and
index rows that can be mutated in a
transaction block
3.000
Maximum size
modified in a
transaction
Maximum size of all data modified
in a write transaction
10 MiB
Aurora DSQL Important Service Quotas
https://docs.aws.amazon.com/aurora-dsql/latest/userguide/CHAP_quotas.html

Serverless applications with Aurora DSQL as a database of choice
https://github.com/Vadym79/AWSLambdaJavaWithAmazonDSQL/blob/main/sample-app-with-pgjdbc/src/main/java/software/amazonaws/example/order/dao/DsqlDataSourceConfig.java
Configuration Of The Hikari Data Source Pool In Java

Serverless applications with Aurora DSQL as a database of choice
https://docs.aws.amazon.com/aurora-dsql/latest/userguide/working-with-postgresql-compatibility-supported-data-types.html
Unsupported Data Types In Aurora DSQL
▪JSON
▪JSONB

Serverless applications with Aurora DSQL as a database of choice
https://docs.aws.amazon.com/aurora-dsql/latest/userguide/working-with-postgresql-compatibility-unsupported-features.html https://marc-bowes.com/dsql-avoid-hot-keys.html
Unsupported Objects In Aurora DSQL
▪Columns with default values
▪Temporary Tables
▪Triggers
▪Sequences
▪ You can use time-based UUIDv7 instead
▪Partitions
▪Functions written in languages other than SQL

Serverless applications with Aurora DSQL as a database of choice
https://docs.aws.amazon.com/aurora-dsql/latest/userguide/working-with-postgresql-compatibility-unsupported-features.html
Unsupported Constraints and Commands In Aurora DSQL
▪Commands
▪Foreign keys
▪Constraints
▪TRUNCATE
▪VACUUM
▪Aurora DSQL doesn't require vacuuming. The system maintains statistics
and manages storage optimization automatically without manual vacuum
commands.

Serverless applications with Aurora DSQL as a database of choice
https://docs.aws.amazon.com/aurora-dsql/latest/userguide/working-with-postgresql-compatibility-unsupported-features.html
Unsupported Extensions In Aurora DSQL
▪PGVector
▪PGAudit
▪pg_stat_statements

Serverless applications with Aurora DSQL as a database of choice
https://docs.aws.amazon.com/aurora-dsql/latest/userguide/working-with-postgresql-compatibility.html https://docs.aws.amazon.com/aurora-dsql/latest/userguide/working-with-postgresql-compatibility-unsupported-features.html
How to talk to Aurora DSQL MCP Server
via Strands SDK

Serverless applications with Aurora DSQL as a database of choice
https://awslabs.github.io/mcp/servers/aurora-dsql-mcp-server/
Aurora DSQL MCP Server
Features overview:
▪Converting human-readable questions and commands into
structured Postgres-compatible SQL queries and executing them
against the configured Aurora DSQL database.
▪Read-only by default, transactions enabled with --allow-writes
▪Connection reuse between requests for improved performance

Serverless applications with Aurora DSQL as a database of choice
https://strandsagents.com/latest/#
Strands Agents SDK
Strands Agents is a Python SDK that takes a model-driven approach to
building and running AI agents.
Features overview:
▪Lightweight & Flexible: Simple agent loop that just works and is fully
customizable
▪Model Agnostic: Support for Amazon Bedrock, Anthropic, LiteLLM,
Llama, Ollama, OpenAI, Writer, and custom providers
▪Advanced Capabilities: Multi-agent systems, autonomous agents, and
streaming support
▪Built-in MCP: Native support for Model Context Protocol (MCP) servers,
enabling access to thousands of pre-built tools

Serverless applications with Aurora DSQL as a database of choice
https://github.com/strands-agents/samples/tree/main/03-integrations/aurora-DSQL
Strands Agents With Aurora DSQL

Serverless applications with Aurora DSQL as a database of choice
https://github.com/strands-agents/samples/tree/main/03-integrations/aurora-DSQL
Strands Agents With Aurora DSQL

Serverless applications with Aurora DSQL as a database of choice
https://github.com/strands-agents/samples/tree/main/03-integrations/aurora-DSQL
Strands Agent With Aurora DSQL

Serverless applications with Aurora DSQL as a database of choice
https://github.com/strands-agents/samples/tree/main/03-integrations/aurora-DSQL
Strands Agents With Aurora DSQL-Get Order By ID

Serverless applications with Aurora DSQL as a database of choice
https://github.com/strands-agents/samples/tree/main/03-integrations/aurora-DSQL
Strands Agents with Aurora DSQL-Get Order By ID

Serverless applications with Aurora DSQL as a database of choice
https://github.com/strands-agents/samples/tree/main/03-integrations/aurora-DSQL
Strands Agent With Aurora DSQL-Single Order Users

Serverless applications with Aurora DSQL as a database of choice
https://github.com/strands-agents/samples/tree/main/03-integrations/aurora-DSQL
Strands Agents With Aurora DSQL-Single Order Users

Serverless applications with Aurora DSQL as a database of choice
Final thoughts and wrap up

Serverless applications with Aurora DSQL as a database of choice
General Advices How To Achive Best DSQL Performance
https://www.postgresql.org/docs/current/pgbench.html https://wiki.postgresql.org/wiki/TPC-H https://marc-bowes.com/dsql-tpcb.html
Create many connections (QPs)
Prefer small rows and small transactions
Consider using separate cluster for each microservice
Use Explain Analyze
Use client-side database connection pooling
Avoid hot keys (read-modify-writes)
Avoid large rows and columns
Avoid big Selects/Deletes

Serverless applications with Aurora DSQL as a database of choice
Aurora DSQL Wrap Up
Easy to setup and get started
No infrastructure management
Multi-region setup right from be beginning
ACID support, especially no eventually consistency at any scale for
single and multi-region cluster
High availability

Serverless applications with Aurora DSQL as a database of choice
Aurora DSQL Wrap Up
Feature gap to be (100%) PostgreSQL compatible is currently quite big
▪Could be a challenge to start with DSQL right nowwith
▪Could be a much bigger challenge to migrate to DSQL
Price estimation is challenging
▪ DPU not easy to predict
▪ ComputeDPUis not very compatible with the Serverless pricing

Ask Me Anything and Feedback
94 Serverless applications with Aurora DSQL as a database of choice

Thank you