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

Last updated: 2019-10-03

My Amazon Relational Database Service (Amazon RDS) instance is in a STORAGE_FULL state, and the instance is hanging. How can I monitor the available storage space for an RDS DB instance so that I can avoid running out of storage?

Short Description

Create alarms in the CloudWatch console or use the AWS Command Line Interface (AWS CLI) to create alarms that monitor free storage space. By creating CloudWatch alarms that notify you when the FreeStorageSpace metric reaches a defined threshold, you can prevent storage full issues. This can prevent downtime that occurs when your RDS DB instance runs out of storage.

Resolution

  1. Open the CloudWatch console, and choose Alarms from the navigation pane.
  2. Choose Create alarm, and choose Select metric.
  3. From the All metrics tab, choose RDS.
  4. Choose Per-Database Metrics.
  5. Search for the FreeStorageSpace metric.
  6. For the instance that you want to monitor, choose the DB instance Identifier FreeStorageSpace metric.
  7. 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 10737418240 bytes.
  8. Choose Next.
  9. From the Configure actions page, for the alarm state, choose in Alarm.
  10. From Select an SNS topic, choose Create new topic.
  11. Enter the topic name, for example, rds-storage-alarm.
  12. For Email endpoints that will receive the notification, enter your email address.
  13. Choose Create topic. This sends a confirmation email to the address you specified.
  14. Open the email notification that you received from AWS Notifications, and choose Confirm subscription.
  15. Return to the Configure actions page in the CloudWatch console.
  16. Choose Next.
  17. Enter a name and description for your alarm, and choose Next.
  18. Review the preview of your metric, and 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.

You can also prevent storage full issues by using the following methods:

For more preventative methods for avoiding storage full issues, see Monitoring Amazon RDS. If your RDS DB instance storage is already full, see How do I resolve problems that occur when Amazon RDS DB instances run out of storage?


Did this article help you?

Anything we could improve?


Need more help?