Skip to content

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

3 minute read
2

I want to create Amazon CloudWatch alarms to monitor my Amazon Relational Database Service (Amazon RDS) DB instance free storage space. I want to prevent the storage-full status.

Resolution

Note: If you receive errors when you run AWS Command Line Interface (AWS CLI) commands, then see Troubleshooting errors for the AWS CLI. Also, make sure that you're using the most recent AWS CLI version.

To prevent the storage-full status, create an alarm that notifies you when the FreeStorageSpace metric reaches a defined threshold. This helps you prevent downtime that occurs when your RDS DB instance runs out of storage.

Note: Amazon Aurora databases don't have the FreeStorageSpace metric. The following steps apply only to Amazon RDS databases.

To create the CloudWatch alarm, complete the following steps:

  1. Open the CloudWatch console.
  2. In the navigation pane, under Alarms, 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. Find the DB instance ID that you want to monitor, and then choose the 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 Alarm state, choose in Alarm.
  11. From Select an SNS topic, choose Create new topic.
  12. Enter a topic name. For example, enter 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 User 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.

To view the metrics for FreeStorageSpace, complete the following steps:

  1. Open the Amazon RDS console.
  2. In the navigation pane, choose Databases.
  3. Select the name of your database.
  4. Choose the Monitoring tab.

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

Note: You can also use the AWS CLI or the CloudWatch API to create alarms that monitor storage space.

For more ways to prevent storage-full issues, take the following actions:

If your DB instance storage is already full, then see How do I resolve issues that occur when Amazon RDS DB instances run out of storage?

Related information

Using Amazon CloudWatch alarms

Monitoring metrics in an Amazon RDS instance

Amazon RDS DB instance running out of storage

4 Comments

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 2 years ago

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

AWS
MODERATOR
replied 2 years 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 2 years ago

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

AWS
MODERATOR
replied 2 years ago