Skip to main content
Aurora Serverless v2 bills per ACU-hour and scales with load, which pays off when load changes a lot. An instance that stays at a similar level all day costs less as a provisioned instance. nOps finds Serverless v2 instances with a steady load and estimates the saving from the cheapest Graviton provisioned class with enough memory for their busiest hour.

Why it matters

Serverless is a common default for new Aurora clusters, but for steady workloads its per-ACU price is higher than a provisioned instance of the same capacity.

How nOps finds it

nOps reads the last 30 complete days of hourly Serverless v2 ACU billing. An instance is flagged when it was billed in at least 95% of the 720 hours and its 10th-percentile hour used at least half the ACUs of its 95th-percentile hour. The target is the cheapest db.r6g, db.r7g or db.t4g class with at least 2 GiB of memory per ACU of its busiest hour (db.t4g only when that hour is 4 ACUs or less). The saving is the on-demand cost of the last 7 days, scaled to a month, times one minus the instance’s list price for the week divided by the list price of the ACUs it used. Instances mostly covered by commitments or credits, and savings under $5 a month, are left out.

Before you start

Permission to add, fail over and remove cluster instances (rds:CreateDBInstance, rds:FailoverDBCluster, rds:DeleteDBInstance).

How to implement

  1. Check the instance’s peak ACU in CloudWatch (ServerlessDatabaseCapacity) at minute level, not just hourly.
  2. Add a provisioned instance of the recommended class to the cluster (aws rds create-db-instance --db-cluster-identifier CLUSTER --db-instance-identifier NEW_ID --db-instance-class NEW_CLASS --engine ENGINE).
  3. When it is available, fail over to it (aws rds failover-db-cluster --db-cluster-identifier CLUSTER --target-db-instance-identifier NEW_ID) if the serverless instance is the writer.
  4. Delete the serverless instance once the provisioned one is serving traffic.
  5. Update Terraform or CloudFormation to match.

Risks and considerations

  • A provisioned instance does not scale up for sudden spikes. nOps sizes it from hourly averages, so check short peaks first.
  • The failover causes a brief interruption for connected clients.
  • To roll back, add a Serverless v2 instance again and fail over to it.

FAQs

One Aurora capacity unit is about 2 GiB of memory, so the provisioned instance needs that much memory for each ACU of the busiest hour.