Communit
y
AWS Community
Why is RDS not just an Open-Source
PostgreSQL? From Classic RDS to
Aurora DSQL.
Vladimir Cageyv Samoylov
AWS Community Builder
Chief Translation Officer &
Co-Owner @FivexL
Vladimir Samoylov
https://www.linkedin.co
m/in/vladimirsamoylov/
AWS Community
Key Takeaway
- A small history of the PostgreSQL in AWS
- Why RDS/Aurora goes beyond “managed PostgreSQL”
- Different options for PostgreSQL in AWS
- Amazon Aurora DSQL
Open-Source PostgreSQL
PostgreSQL on EC2
More info:
https://aws.amazon.com/blogs/opensource/behind-the-scenes-on-aws-contributions-to-open-source-databases
AWS Community
Typical problems with self-managed PostgreSQL
- Scalability
- High availability (HA)
- Backup and disaster recovery
- Security patching and maintenance
- Disk space, network, resource management
Amazon RDS for PostgreSQL
AWS Community
Amazon RDS (2009) (MySQL only)
AWS Community
Amazon RDS for PostgreSQL (2013)
Amazon Aurora PostgreSQL
Amazon Aurora with PostgreSQL Compatibility: Aug 30, 2017
AWS Community
Amazon Aurora PostgreSQL (2017)
AWS Community
Amazon Aurora Storage System
Amazon Aurora Serverless
V1: Announced: GA: Aug 9, 2018 EOL: March 31, 2025.
V2: Announced: Dec 1, 2020 GA: Apr 21, 2022
V2 Scaling to 0: Nov 20, 2024
AWS Community
Serverless Request Routers
Amazon Aurora Global Database
Write forwarding: Nov 9, 2023
Global Writer Endpoint: Oct 22, 2024
AWS Community
Amazon Aurora Global Database
More info: https://www.youtube.com/watch?v=1vFg1z-2E7Y
Amazon Time Sync Service
Announced: Nov 29, 2017
Microsecond-accurate time: Nov 16, 2023
Amazon Aurora Limitless
Announced: Nov 27, 2023 GA: Oct 31, 2024
AWS Community
Amazon Aurora Limitless
More info: https://aws.amazon.com/blogs/aws/amazon-aurora-postgresql-limitless-database-is-now-generally-available/
PostgreSQL 17
Release date: Sep 26, 2024
AWS Community
PostgreSQL 17 Logical Replication
More info: https://www.postgresql.org/about/news/postgresql-17-released-2936/
Amazon Aurora DSQL
Announced: Dec 03, 2024
Currently: Free Preview
AWS Community
- A = Atomicity. The entire transaction takes place at once or doesn't
happen at all.
- C = Consistency. The database must be consistent before and after
the transaction.
- I = Isolation. Multiple Transactions occur independently without
interference.
- D = Durability. The changes of a successful transaction occur even if
the system failure occurs.
ACID
AWS Community
DSQL. Layers
More info: https://www.youtube.com/watch?v=huGmR_mi5dQ
AWS Community
Split brain handling by 3rd region
More info: https://www.youtube.com/watch?v=huGmR_mi5dQ
AWS Community
- Encryption at rest by default. Aurora DSQL owns KMS keys.
- Encryption in transit by default. mTLS to encrypt traffic. API calls must be
signed.
- Private onprem connections: Site-to-Site VPN, Direct Connect.
- IAM: identity, actions, resources, conditions, ABAC
- Resilience: AWS Backup - planned. Replication by default. High availability by
default.
DSQL: Security
AWS Community
DSQL. Authentication and authorization.
More info: https://docs.aws.amazon.com/aurora-dsql/latest/userguide/what-is-aurora-dsql.html
- “dsql:...” - for manage clusters
- "dsql:DbConnectAdmin" to connect as Admin Role. (Managed)
- "dsql:DbConnect" to connect as other roles
- No long-lived passwords
AWS Community
DSQL. How to connect.
More info: https://docs.aws.amazon.com/aurora-dsql/latest/userguide/what-is-aurora-dsql.html
export PGPASSWORD=$(aws dsql generate-db-connect-admin-auth-token 
--region us-east-1 
--expires-in 3600 
--hostname your_cluster_endpoint)
export PGSSLMODE=require
# psql use the values set in PGPASSWORD and PGSSLMODE.
psql --quiet 
--username admin 
--dbname postgres 
--host your_cluster_endpoint
AWS Community
DSQL. Quotas.
AWS Community
Primary keys in Aurora DSQL
- Defining a primary key for your table is similar to the CLUSTER operation in
PostgreSQL
- DSQL uses the primary key to construct a cluster-wide unique key
- If we don’t create a primary key with the table, DSQL added hidden ID, and we
can’t add a primary key later
- Don’t use sequence as primary key. DSQL uses a primary key to distribute data
across storage systems. Random UUID could be better. (For read-only or read
most it could be ascending keys)
- Number of columns in PK and combined size of a column are limited
AWS Community
Unsupported PostgreSQL features in Aurora
DSQL (JAN 2025)
More info: https://docs.aws.amazon.com/aurora-dsql/latest/userguide/what-is-aurora-dsql.html
- Views, Temp Tables, Triggers, Sequences
- Foreign keys, Exclusion constraints
- system timezone is UTC only
- transaction can't contain mixed DDL and DML operations, 1 DDL only
- transaction cannot modify more than 10,000 rows, modified by number of
secondary indexes
AWS Community
Database limits in Aurora DSQL
AWS Community
- PostgreSQL 16
- Core relational features like ACID transactions, secondary indexes, joins, insert,
and updates
- SQL expressions return identical data in query results, including sort order,
scale, and precision for numeric operations, and equivalence for string
operations
- Standard PostgreSQL drivers and supports common PostgreSQL-compatible
tools
- Many system tables and views from PostgreSQL are available in DSQL
Supported PostgreSQL features in Aurora DSQL
(JAN 2025)
More info: https://docs.aws.amazon.com/aurora-dsql/latest/userguide/what-is-aurora-dsql.html
AWS Community
- lock-free concurrency control mechanism
- snapshot isolation
- optimistic concurrency control (OCC) is evaluated at transaction commit time
- in case of conflict we execute whatever comes first in time and retry the rest
Concurrency control in Aurora DSQL
More info: https://docs.aws.amazon.com/aurora-dsql/latest/userguide/what-is-aurora-dsql.html
AWS Community
Snapshot Isolation and Serializable Isolation
Definition Consistent snapshot of the
database.
Executed one at a time (serially).
Concurrency High concurrency, lock-free
execution.
Reduced concurrency due to
stricter locking mechanisms.
Mechanism Optimistic Concurrency
Control (conflicts at commit)
Strict locking or serialization of
transactions
Conflict
Handling
Retries Avoids conflicts entirely
AWS Community
DSQL. Preview testing.
- Cluster creation much faster than Aurora. < 5 min
- endpoints: xxxxx.dsql.us-east-1.on.aws
- Temp token generation built-in in the UI
- admin username is admin
- ~12 Mb default cluster storage
AWS Community
https://github.com/amazon-contributing/aurora-dsql-benchbase-benchmarking
https://github.com/cmu-db/benchbase
- Host: c7a.xlarge
- scalefactor: 200
- terminals: 200
- Throughput (requests/second): 2523.64
- Goodput (requests/second): 2945.80
- Full results: results.zip
- Full test config: benchbase-auroradsql.zip
DSQL. Benchmark.
AWS Community
DSQL. The only metric in Preview.
AWS Community
Amazon files for Ireland-to-US subsea cable
AWS Community
Aurora DSQL vs … distributed always-on …
Google Cloud
Spanner
Cockroach DB
Apache
Phoenix
YugabyteDB
AWS Community
DSQL. Use Cases.
- Financial Industry. Payment Services. Global ledger. Transactional DB. Market
orders.
- Healthcare Industry. Patient records and logs. Handle regional failures.
- E-Commerce and Retail. Handle global shopping cards and order processing.
- Education Platforms. Multi-regional exam systems.
Vladimir Samoylov
Co-Owner @FivexL
Founder @ZoJump
https://www.linkedin.co
m/in/vladimirsamoylov/

Why is RDS not just an Open-Source PostgreSQL_ From Classic RDS to Aurora DSQL

  • 1.
    Communit y AWS Community Why isRDS not just an Open-Source PostgreSQL? From Classic RDS to Aurora DSQL. Vladimir Cageyv Samoylov
  • 2.
    AWS Community Builder ChiefTranslation Officer & Co-Owner @FivexL Vladimir Samoylov https://www.linkedin.co m/in/vladimirsamoylov/
  • 3.
    AWS Community Key Takeaway -A small history of the PostgreSQL in AWS - Why RDS/Aurora goes beyond “managed PostgreSQL” - Different options for PostgreSQL in AWS - Amazon Aurora DSQL
  • 4.
    Open-Source PostgreSQL PostgreSQL onEC2 More info: https://aws.amazon.com/blogs/opensource/behind-the-scenes-on-aws-contributions-to-open-source-databases
  • 5.
    AWS Community Typical problemswith self-managed PostgreSQL - Scalability - High availability (HA) - Backup and disaster recovery - Security patching and maintenance - Disk space, network, resource management
  • 6.
    Amazon RDS forPostgreSQL
  • 7.
    AWS Community Amazon RDS(2009) (MySQL only)
  • 8.
    AWS Community Amazon RDSfor PostgreSQL (2013)
  • 9.
    Amazon Aurora PostgreSQL AmazonAurora with PostgreSQL Compatibility: Aug 30, 2017
  • 10.
    AWS Community Amazon AuroraPostgreSQL (2017)
  • 11.
  • 12.
    Amazon Aurora Serverless V1:Announced: GA: Aug 9, 2018 EOL: March 31, 2025. V2: Announced: Dec 1, 2020 GA: Apr 21, 2022 V2 Scaling to 0: Nov 20, 2024
  • 13.
  • 14.
    Amazon Aurora GlobalDatabase Write forwarding: Nov 9, 2023 Global Writer Endpoint: Oct 22, 2024
  • 15.
    AWS Community Amazon AuroraGlobal Database More info: https://www.youtube.com/watch?v=1vFg1z-2E7Y
  • 16.
    Amazon Time SyncService Announced: Nov 29, 2017 Microsecond-accurate time: Nov 16, 2023
  • 17.
    Amazon Aurora Limitless Announced:Nov 27, 2023 GA: Oct 31, 2024
  • 18.
    AWS Community Amazon AuroraLimitless More info: https://aws.amazon.com/blogs/aws/amazon-aurora-postgresql-limitless-database-is-now-generally-available/
  • 19.
  • 20.
    AWS Community PostgreSQL 17Logical Replication More info: https://www.postgresql.org/about/news/postgresql-17-released-2936/
  • 21.
    Amazon Aurora DSQL Announced:Dec 03, 2024 Currently: Free Preview
  • 22.
    AWS Community - A= Atomicity. The entire transaction takes place at once or doesn't happen at all. - C = Consistency. The database must be consistent before and after the transaction. - I = Isolation. Multiple Transactions occur independently without interference. - D = Durability. The changes of a successful transaction occur even if the system failure occurs. ACID
  • 23.
    AWS Community DSQL. Layers Moreinfo: https://www.youtube.com/watch?v=huGmR_mi5dQ
  • 24.
    AWS Community Split brainhandling by 3rd region More info: https://www.youtube.com/watch?v=huGmR_mi5dQ
  • 25.
    AWS Community - Encryptionat rest by default. Aurora DSQL owns KMS keys. - Encryption in transit by default. mTLS to encrypt traffic. API calls must be signed. - Private onprem connections: Site-to-Site VPN, Direct Connect. - IAM: identity, actions, resources, conditions, ABAC - Resilience: AWS Backup - planned. Replication by default. High availability by default. DSQL: Security
  • 26.
    AWS Community DSQL. Authenticationand authorization. More info: https://docs.aws.amazon.com/aurora-dsql/latest/userguide/what-is-aurora-dsql.html - “dsql:...” - for manage clusters - "dsql:DbConnectAdmin" to connect as Admin Role. (Managed) - "dsql:DbConnect" to connect as other roles - No long-lived passwords
  • 27.
    AWS Community DSQL. Howto connect. More info: https://docs.aws.amazon.com/aurora-dsql/latest/userguide/what-is-aurora-dsql.html export PGPASSWORD=$(aws dsql generate-db-connect-admin-auth-token --region us-east-1 --expires-in 3600 --hostname your_cluster_endpoint) export PGSSLMODE=require # psql use the values set in PGPASSWORD and PGSSLMODE. psql --quiet --username admin --dbname postgres --host your_cluster_endpoint
  • 28.
  • 29.
    AWS Community Primary keysin Aurora DSQL - Defining a primary key for your table is similar to the CLUSTER operation in PostgreSQL - DSQL uses the primary key to construct a cluster-wide unique key - If we don’t create a primary key with the table, DSQL added hidden ID, and we can’t add a primary key later - Don’t use sequence as primary key. DSQL uses a primary key to distribute data across storage systems. Random UUID could be better. (For read-only or read most it could be ascending keys) - Number of columns in PK and combined size of a column are limited
  • 30.
    AWS Community Unsupported PostgreSQLfeatures in Aurora DSQL (JAN 2025) More info: https://docs.aws.amazon.com/aurora-dsql/latest/userguide/what-is-aurora-dsql.html - Views, Temp Tables, Triggers, Sequences - Foreign keys, Exclusion constraints - system timezone is UTC only - transaction can't contain mixed DDL and DML operations, 1 DDL only - transaction cannot modify more than 10,000 rows, modified by number of secondary indexes
  • 31.
  • 32.
    AWS Community - PostgreSQL16 - Core relational features like ACID transactions, secondary indexes, joins, insert, and updates - SQL expressions return identical data in query results, including sort order, scale, and precision for numeric operations, and equivalence for string operations - Standard PostgreSQL drivers and supports common PostgreSQL-compatible tools - Many system tables and views from PostgreSQL are available in DSQL Supported PostgreSQL features in Aurora DSQL (JAN 2025) More info: https://docs.aws.amazon.com/aurora-dsql/latest/userguide/what-is-aurora-dsql.html
  • 33.
    AWS Community - lock-freeconcurrency control mechanism - snapshot isolation - optimistic concurrency control (OCC) is evaluated at transaction commit time - in case of conflict we execute whatever comes first in time and retry the rest Concurrency control in Aurora DSQL More info: https://docs.aws.amazon.com/aurora-dsql/latest/userguide/what-is-aurora-dsql.html
  • 34.
    AWS Community Snapshot Isolationand Serializable Isolation Definition Consistent snapshot of the database. Executed one at a time (serially). Concurrency High concurrency, lock-free execution. Reduced concurrency due to stricter locking mechanisms. Mechanism Optimistic Concurrency Control (conflicts at commit) Strict locking or serialization of transactions Conflict Handling Retries Avoids conflicts entirely
  • 35.
    AWS Community DSQL. Previewtesting. - Cluster creation much faster than Aurora. < 5 min - endpoints: xxxxx.dsql.us-east-1.on.aws - Temp token generation built-in in the UI - admin username is admin - ~12 Mb default cluster storage
  • 36.
    AWS Community https://github.com/amazon-contributing/aurora-dsql-benchbase-benchmarking https://github.com/cmu-db/benchbase - Host:c7a.xlarge - scalefactor: 200 - terminals: 200 - Throughput (requests/second): 2523.64 - Goodput (requests/second): 2945.80 - Full results: results.zip - Full test config: benchbase-auroradsql.zip DSQL. Benchmark.
  • 37.
    AWS Community DSQL. Theonly metric in Preview.
  • 38.
    AWS Community Amazon filesfor Ireland-to-US subsea cable
  • 39.
    AWS Community Aurora DSQLvs … distributed always-on … Google Cloud Spanner Cockroach DB Apache Phoenix YugabyteDB
  • 40.
    AWS Community DSQL. UseCases. - Financial Industry. Payment Services. Global ledger. Transactional DB. Market orders. - Healthcare Industry. Patient records and logs. Handle regional failures. - E-Commerce and Retail. Handle global shopping cards and order processing. - Education Platforms. Multi-regional exam systems.
  • 41.
    Vladimir Samoylov Co-Owner @FivexL Founder@ZoJump https://www.linkedin.co m/in/vladimirsamoylov/