How can I create CloudWatch alarms to monitor the Amazon RDS free storage space and prevent storage full issues?

3 minute read

My Amazon Relational Database Service (Amazon RDS) DB instance is in a STORAGE_FULL state, and the DB instance stops responding.

Short description

To prevent full storage issues, use the Amazon CloudWatch console or the AWS Command Line Interface (AWS CLI) to create alarms that monitor storage space. Specifically, create an alarm that notifies you when the FreeStorageSpace metric reaches a defined threshold. This helps you prevent downtime that occurs when your Amazon RDS DB instance runs out of storage.

Note: Aurora databases don't have the FreeStorageSpace metric. Therefore, these steps apply only to RDS databases.


Note: If you receive errors when you run AWS CLI commands, see Troubleshoot AWS CLI errors. Also, make sure that you're using the most recent AWS CLI version.

  1. Open the CloudWatch console.
  2. Under Alarms in the navigation pane, choose All alarms.
  3. Choose Create alarm, and then choose Select metric.
  4. Search for the FreeStorageSpace metric.
  5. Choose RDS, and then choose Per-Database metrics.
  6. For the instance that you want to monitor, choose the DB instance identifier FreeStorageSpace metric.
  7. Set the statistic to Minimum, and set the period to 1 minute.
  8. In the Conditions section, configure the threshold. For example, choose Lower/Equal, and then specify the threshold value.
    Note: You must specify the value for the parameter in bytes. For example, 10 GB is 10,737,418,240 bytes.
  9. Choose Next.
  10. From the Configure actions page, for the alarm state, choose in Alarm.
  11. From Select an SNS topic, choose Create new topic.
  12. Enter the topic name. For example: rds-storage-alarm.
  13. For Email endpoints that will receive the notification, enter your email address.
  14. Choose Create topic. This action sends a confirmation email to the address that you specified.
  15. Open the email notification that you received from AWS Notifications, and then choose Confirm subscription.
  16. Return to the Configure actions page in the CloudWatch console.
  17. Choose Next.
  18. Enter a name and description for your alarm, and then choose Next.
  19. Review the preview of your metric, and then choose Create alarm.

After you create the alarm, open the Amazon RDS console, and then choose Databases from the navigation pane. Choose the name of your database, and then choose the Monitoring tab to view the metrics for FreeStorageSpace.

It's also a best practice to create a second, critical alarm for a lower threshold. For example, you might set your first alarm for 25 GB, and the second critical alarm to 10 GB.

For more ways to prevent storage full issues, use the following methods:

For more information, see Monitoring metrics in an Amazon RDS instance. If your RDS DB instance storage is already full, then see How do I resolve problems that occur when Amazon RDS DB instances run out of storage?

Related information

Using Amazon CloudWatch alarms



TBH, don't find this metric useful at all without having the current storage as well. I understand, you will have this information enabling enhanced monitoring but why? It's kinda like basic df information sort of.

replied 8 months ago

Thank you for your comment. We'll review and update the Knowledge Center article as needed.

profile pictureAWS
replied 8 months ago

how about the RDS with 'Storage autoscaling' enabled?

Example, the RDS has 50 GB of storage and set to autoscale with 100 GB threshold. The CW 'FreeStorageSpace' is set to alarm if it falls to <= 40GB (80% of the 50 GB),

When that 50 GB increases to 60, 70, ... 100 GB, the alarm-configuration remains the same, is there a way for that to increase automatically as well?

Because the CW always say that the value should be a 'number', not a percentile.

replied 8 months ago

Thank you for your comment. We'll review and update the Knowledge Center article as needed.

profile pictureAWS
replied 8 months ago