AWS Database Blog
Amazon RDS now supports detailed backup storage billing
Recently, AWS announced the general availability of the Amazon RDS detailed backup storage billing feature. This feature applies to PostgreSQL, MySQL, MariaDB, Oracle, and SQL Server database engines. Before the release of this feature, Amazon RDS backup charges were presented as a single-line item per Region on the monthly bill. However, it was hard to understand the breakdown of Amazon RDS backup billing charges by both daily automated database backups as well as any manual DB snapshots. Now, you can view your Amazon RDS backup storage billing based on your cost allocation tags in AWS Cost Explorer and in your Cost and Usage Report (CUR).
In this blog post, I show you how to set tag values to your Amazon RDS database instances, activate these tags in your cost allocation dashboard, and view your detailed backup storage billing costs in AWS Cost Explorer and in your CUR.
Setting up to view your Amazon RDS backup storage billing takes a few easy steps once you log in to the AWS Management Console. You can get started either from the RDS console or directly through AWS Cost Explorer if you already have your DB instances tagged.
Step 1: Create tags for your DB instances through the Amazon RDS console, AWS CLI, or API. If you already have a tagging system in place, no further action is needed and you can skip to Step 2.
Step 2: Make sure that your user-defined cost allocation tags are active in your Billing Management Console. Under the Cost allocation tags tab, activate all tag keys for which you would like to view the detailed backup storage breakdown.
Step 3: View your detailed backup storage billing costs by filtering on tag and usage type in AWS Cost Explorer. You want to filter down to view by Usage Type (RDS:ChargedBackupUsage), Service, Region, and then Group by the tags you specify.
Step 4:You can also see your metering records in the Cost and Usage Report where ResourceId and resourceTags are shown in additional columns.
How detailed billing distributes credits across DB instances
Currently, you receive free backup storage up to the total size of your provisioned storage within a Region. For example, if you had two DB instances with 2 TB of provisioned database storage, you would get 4 TB of backup storage in the Region for free. With detailed backup billing, for each database instance in your account, the size of backup usage is compared to provisioned storage size. If backup usage exceeds storage size, the exceeding part is charged to you. Conversely, if backup usage is less than storage size, the difference is counted as usage credits and discounted proportionally from charges applied to other instances. Backup storage not associated with an active database instance is charged entirely, except for discounts generated by other instances of the same account. This compensation mechanism is set up in such a way that ensures that the charges for every Amazon RDS customer are exactly the same as the existing backup storage billing.
Caveats to using detailed backup billing
First, the billing model for Amazon RDS backups is based on charging the excess of backup space usage for an account compared to total provisioned storage for the same account. Detailed backup billing takes great care to make sure that the charges to customers are exactly the same as before, but the partitioning of charges across DB instances is based on a metric that provides approximate results. For example, a cost center might have short-term backup policies and multiple read replica DB instances that generate backup credits as they use provisioned storage, but no backup space. The backup credits of that cost center are used to compensate the backup usage of other cost centers, so that their operating costs appear lower than they really are. If you require exact partitioning of charges across cost centers, you should use separate accounts to ensure that the results are fully mirroring the charges due to each cost center.
Second, Amazon RDS detailed backup storage billing has been enabled as of October 8, 2019 on a going-forward basis. For dates before October 8, 2019, you will still view backup storage billing as a single-line item per region.
Third, as orphaned snapshots have no DB instance to refer to, there are no tags that can be applied to these snapshots. In both Cost Explorer and Cost and Usage Report, the customer will see costs for RDS orphaned snapshots aggregated in a single, untagged item.
Finally, when viewing your tagged DB instances, please wait at least one hour for newly created tags and DB instances to persist to AWS Cost Explorer and Cost and Usage Report. Tagging short-lived DB instances (that is, those instances running for less than one hour), might not have their tags exported and therefore would not be applied to snapshots. Snapshots of short-lived DB instances are aggregated as untagged items in AWS Cost Explorer and CUR.
DB instance tags are now applied to automated backups and manual snapshots, giving you an easy way to view your Amazon RDS backup storage billing estimates. You can view these breakdowns in AWS Cost Explorer or in your Cost and Usage Report in the Billing Management Console.
I would highly encourage you to set this up for yourself as mentioned in the steps above. Let us know your feedback through the comments in this post or through the RDS Discussion Forum.
About the Author
Andrii Kostenko is a Software Development Engineer with Amazon Web Services.