This method gives an overall alert on RDS coverage, due to the way that RDS RIs are applied by AWS.
Create a Policy with two conditions:
- First check if an RDS instance has any Reserved Instance Hours usage (ie: it is covered, either fully or partially, by an RDS Reservation)
- Secondly, check if an RDS instance's % Reserved is less than n%
(for a baseline, check the RDS Instance Hours usage report to see the % reserved per instance).
Please note:
During billing, running DB instance usage is first compared to your active Reserved Instances to minimise costs. Each hour, if the amount of running instances is less than or equal to the total applicable Reserved Instances you have purchased, all running DB instances will be charged at the Reserved Instance rate. Any usage of running DB instances that exceeds the amount of applicable Reserved Instances you have purchased will be charged the On-Demand rate.
Therefore, the application of RIs to individual instances may vary as a result of the usage pattern of RDS instances versus applicable RDS RIs.