Amazon Aurora customers often struggle with IOPS costs. This article bridges CloudWatch metrics and billing by showing how to calculate and predict Aurora IOPS usage over time. Using RUNNING SUM on volume metrics helps forecast monthly costs before bills arrive. This practical guide helps DBAs optimize performance while controlling expenses, enabling better database decisions and predictable cloud spending.
Introduction
Monitoring and understanding your database's Input/Output Operations Per Second (IOPS) usage is essential for optimizing performance and managing costs in Amazon Aurora environments. This blog post guides you through the process of accurately calculating IOPS usage for your Aurora DB clusters using Amazon CloudWatch metrics. By following these steps, you can better understand your database's performance characteristics and make informed decisions about resource utilization and cost management.
Prerequisites
Before you begin, ensure you have:
- An active Amazon Aurora DB cluster running MySQL or PostgreSQL
- Access to the AWS Management Console with permissions to view Amazon CloudWatch metrics
- Basic familiarity with Amazon CloudWatch metrics and graphs
- Understanding of Amazon Aurora pricing model
We need to keep a note that we can only monitor past 63 days data on 5 minute granularity in cloudwatch
Calculating IOPS usage with CloudWatch
To calculate the IOPS usage of your Aurora DB clusters, you need to monitor specific CloudWatch metrics that track read and write operations. Follow these steps to access and analyze these metrics.
Step 1: Access CloudWatch metrics for your Aurora cluster
- Sign in to the AWS Management Console and open the Amazon CloudWatch console.
- In the navigation pane, choose Metrics.
- Select the AWS/RDS namespace.
- Choose DBClusterIdentifier to view metrics for your Aurora clusters.
- Select your specific DB cluster to view its metrics.
Step 2: Identify the relevant IOPS metrics
For Aurora IOPS calculation, focus on these two critical metrics:
- VolumeReadIOPS: The number of billed read I/O operations from a cluster volume per second
- VolumeWriteIOPS: The number of billed write I/O operations to a cluster volume per second
These metrics provide the foundation for calculating your total IOPS usage and associated costs.
Step 3: Calculate IOPS for a specific timeframe
After selecting the Volume IOPS metrics, use the SUM common function, which gives you the sum of the IOPS for any time-frame in past 63 days:

Now the metrics VolumeWriteIOPS and VolumeReadIOPS are shown below:


Step 4: Calculate IOPS usage over an extended period
While the SUM function is useful for checking IOPS usage for a single timeframe, calculating usage over an extended period (such as a month) requires additional steps.
For example, when you want to calculate the IOPS usage of a particular cluster for the whole month, you need to use another function on top of the SUM function, specifically the RUNNING SUM function:
How to use the RUNNING SUM function:
- In the CloudWatch metrics graph, select the Graphed metrics tab.
- For each metric (VolumeReadIOPS and VolumeWriteIOPS), click on the dropdown under Statistics and select Sum.
- Then click on the dropdown under Period and select an appropriate period (e.g., 5 minutes).
- Finally, in the Add math dropdown, select RUNNING SUM.

Result after using RUNNING SUM function on both parameters individually:

In the screenshot above, we can note down the values of expressions e1 and e2:
- e1 (VolumeWriteIOPS) = 20,923,284,310
- e2 (VolumeReadIOPS) = 1,494,652,841
Now we add these values:
Total IOPS = e1 + e2 = 22,417,937,151
Calculating the IOPS bill:
IO Bill = {(Total IOPS)/1 million} * {$0.20}
// $0.20 is the IO rate per million and it can vary from region to region
= (22,417,937,151/1,000,000) * $0.20
= 22,417.94 * $0.20
= $4,483.58 USD
Step 5: Verify calculations with granular data
If we check the result of the Running sum function on a 5-minute base granularity, the results should add up consistently:

We can confirm from the Cost Explorer report that these calculations are accurate and match your actual billing.
Clean up
After completing your IOPS analysis, consider these clean-up steps:
- Remove any custom dashboards or alarms you created specifically for this analysis if they're no longer needed.
- If you modified any CloudWatch settings or created custom metrics, reset them to their original state if appropriate.
- If you exported any data for further analysis, ensure it's stored securely or deleted if no longer required.
Conclusion
Understanding and accurately calculating IOPS usage for your Aurora DB clusters is crucial for cost optimization and performance monitoring. By leveraging CloudWatch metrics and the RUNNING SUM function, you can gain valuable insights into your database's I/O patterns and make informed decisions about resource allocation.
To learn more about managing and optimizing your Aurora database performance:
For confirmation on why we use the 5 minutes granularity for IOPS please check Amazon CloudWatch metrics for Amazon Aurora.
For a deeper understanding of how Aurora IOPS are calculated, see What are I/O operations in Aurora and how are they calculated?