Scaling Relational Databases with Aurora Serverless v2
Naveen Teja
2/27/2026

Provisioning traditional RDS instances requires predicting database capacity requirements, which often leads to over-provisioning and wasted cloud spend. Amazon Aurora Serverless v2 fundamentally changes this by scaling compute and memory in real-time, matching database capacity directly to application demand within milliseconds.
Unlike the first iteration of Aurora Serverless, v2 is built for highly demanding, enterprise-grade production workloads. It scales in increments as small as 0.5 Aurora Capacity Units (ACUs), ensuring you only pay for the exact resources your queries consume. This makes it the perfect backing store for variable traffic applications, such as e-commerce platforms during flash sales.
When defining this in Terraform, you provision an Aurora cluster and specify the `serverlessv2_scaling_configuration` block. You then attach an RDS cluster instance using the `db.serverless` instance class. This configuration automatically manages the underlying compute fleet without any manual intervention.
resource "aws_rds_cluster" "serverless" {
cluster_identifier = "prod-aurora-cluster"
engine = "aurora-postgresql"
engine_mode = "provisioned"
engine_version = "13.6"
serverlessv2_scaling_configuration {
max_capacity = 16.0
min_capacity = 0.5
}
}
resource "aws_rds_cluster_instance" "main" {
cluster_identifier = aws_rds_cluster.serverless.id
instance_class = "db.serverless"
engine = aws_rds_cluster.serverless.engine
}You might also like

Migrating from EC2 to AWS Fargate: A Step-by-Step Guide

Multi-Region Active-Active Architecture on AWS

Implementing AWS GuardDuty with Automated Threat Response

OpenTofu vs Terraform in 2024: Migration Guide and Key Differences

Zero-Trust Networking on AWS with IAM Identity Center and SCPs
