TalksAWS re:Invent 2025 - Amazon Aurora DSQL: A developer's perspective (DAT401)

AWS re:Invent 2025 - Amazon Aurora DSQL: A developer's perspective (DAT401)

AWS re:Invent 2025 - Amazon Aurora DSQL: A developer's perspective

Introduction to Amazon Aurora DSQL

  • DSQL is a distributed implementation of PostgreSQL announced at re:Invent the previous year
  • Key features:
    • Virtually unlimited scale
    • High availability
    • No infrastructure management
    • Ease of use

Cluster Creation and Connectivity

  • DSQL clusters can be created quickly and easily through the AWS console
  • Clusters support single-region or multi-region configurations
  • Connecting to DSQL clusters can be done through the web-based query editor or AWS Cloud Shell

Developing with DSQL

  • The presentation uses a starter kit with a CDK stack and Lambda function
  • The Lambda function demonstrates connecting to DSQL and running simple queries
  • DSQL provides secure connectivity through pre-signed URLs, eliminating the need to manage passwords

Transactions and Concurrency Control

  • DSQL uses optimistic concurrency control to handle transactions
  • Transactions are ACID (Atomic, Consistent, Isolated, Durable)
  • DSQL provides strong snapshot isolation, with only one potential anomaly (write skew)
  • Developers need to handle retries and serialization errors when conflicts occur

Building a Banking Application

  • The presenters demonstrate building a simple banking application using DSQL
  • The application includes functionality to transfer funds between accounts
  • Handling concurrency is crucial, as multiple transactions attempting to update the same accounts can cause conflicts

Handling Conflicts and Retries

  • The application includes a retry loop to handle serialization errors caused by concurrent updates
  • Metrics are collected on the number of retries and duration of transactions to monitor performance
  • Indexing is used to optimize query performance, with the "create index async" feature to build indexes online without blocking

Scaling and Pricing

  • The application is scaled to 10,000 transactions per second without any additional configuration
  • DSQL pricing is based on a "Distributed Processing Unit" (DPU) metric, which covers compute, storage, and I/O usage
  • Pricing is pay-per-use, allowing the system to scale up and down without over-provisioning

Key Takeaways

  • DSQL provides a fully managed, scalable, and highly available PostgreSQL-compatible database service
  • Optimistic concurrency control simplifies transaction handling, but requires developers to handle retries and serialization errors
  • DSQL offers features like online index creation and pay-per-use pricing to support high-scale, dynamic applications
  • The presentation showcases DSQL's ability to handle complex, high-throughput workloads with minimal operational overhead

Your Digital Journey deserves a great story.

Build one with us.

Cookies Icon

These cookies are used to collect information about how you interact with this website and allow us to remember you. We use this information to improve and customize your browsing experience, as well as for analytics.

If you decline, your information won’t be tracked when you visit this website. A single cookie will be used in your browser to remember your preference.