Amazon RDS vs. Aurora Serverless: What's the better option?

Amazon RDS and Aurora Serverless both provide relational database services. But Aurora offers more flexible resource management and performance, and it can result in lower costs.

Relational databases are foundational to applications because they provide a reliable and flexible way to manage and interact with data. Developers shouldn't take the choice of database lightly, as it affects an application's performance, cost and security as well as its ability to change and grow.

AWS has two primary relational database services: Amazon RDS and Amazon Aurora Serverless. This article breaks down the two services and compares factors such as resource management, performance and cost.

What is Amazon RDS?

Amazon RDS is a managed service that launches and maintains database servers in the cloud. This service enables developers to choose database instance type and size. Users can also select a database engine, including Amazon Aurora, PostgreSQL, MySQL, MariaDB, Oracle and Microsoft SQL Server.

What is Amazon Aurora Serverless?

Aurora Serverless is a relational database engine with an updated deployment model so developers don't have to manually launch database servers. It is compatible with MySQL and PostgreSQL, and it is designed explicitly to work in the AWS cloud.

Resource management

Aurora Serverless provides greater flexibility in resource management and can deliver superior performance. Developers configure compute in terms of minimum and maximum Aurora Capacity Units (ACUs), which are a combination of virtual CPUs and memory -- 2 gigabytes (GB) per ACU. Aurora Serverless can also automatically scale compute capacity up or down based on demand. In 2022, Amazon introduced Aurora Serverless v2 with enhanced scalability and performance features.

In contrast, RDS requires manual configuration changes to scale a database server to a larger instance type. This can cause up to five minutes of downtime. RDS offers autoscaling for read replicas, but the process takes a few minutes to execute as it must deploy additional RDS instances. Aurora Serverless' automatic scaling results in much faster deployment times, typically within a few seconds.

Another factor to consider is that Aurora Serverless has a maximum memory capacity of 128 ACUs (256 GB of memory, which is the same as a db.r5.8xlarge RDS instance), while many instances available in RDS offer higher capacity, even as high as 3,904 GB.

When using either Aurora Provisioned or Serverless, developers don't have to configure storage given that Aurora automatically assigns the required storage space. Aurora also offers the I/O-Optimized feature, which boosts performance and lowers cost for I/O intensive applications.

Performance

Aurora Serverless is a good fit for applications with unpredictable usage spikes. The database can be configured to quickly and automatically increase or decrease capacity as needed. Even though this setting offers the option to reduce capacity down to 0.5 ACUs during periods of low usage, users must thoroughly evaluate it in production environments. Reprovisioning compute capacity takes several seconds and can affect UX during sudden spikes. In contrast, these spikes require time-consuming capacity adjustments when using Amazon RDS.

Regarding performance, it's important to execute load tests and determine which option delivers the best results. Since provisioned RDS offers a wide range of instance types, users can choose hardware characteristics -- memory optimizations, processor types, etc. -- tailored to specific use cases. However, the Aurora engine, whether Provisioned or Serverless, generally outperforms its RDS counterparts, such as RDS MySQL and RDS PostgreSQL.

Cost

Aurora Serverless can result in cost savings compared to provisioned Amazon RDS due to its dynamic compute capacity feature. However, if developers choose Aurora for the wrong use case or don't configure it properly, it can result in higher AWS costs. For example, in the North Virginia region, a single-AZ r5.large instance running RDS MySQL (16 GiB, $0.24 per hour) is the equivalent of 8 ACUs ($0.96 per hour), as of publication.

In this case, if provisioned with constant capacity, Aurora Serverless is four times more expensive. However, there are cases where Aurora Serverless' dynamic compute capacity results in much lower costs.

It's also important to note that Aurora Serverless is not eligible for Reserved Instances, which can lower RDS provisioned costs by approximately 30% to 60%, depending on the instance type and commitment term. An accurate cost comparison must consider usage patterns, load tests and Aurora Serverless dynamic compute configurations.

Editor's note: This article was updated to reflect changes in Amazon RDS and Aurora Serverless.

Ernesto Marquez is the owner and project director at Concurrency Labs, where he helps startups launch and grow their applications on AWS. He enjoys building serverless architectures, building data analytics solutions, implementing automation and helping customers cut their AWS costs.

Next Steps

When to use Amazon RDS vs. Redshift

Use Amazon CloudWatch metrics to monitor Aurora

Dig Deeper on Cloud provider platforms and tools