AWS RDS Alerts

Set Up an SNS Topic

  1. Open SNS Console

    • Log into the AWS Management Console and navigate to Amazon SNS section.

  2. Create SNS Topic

    • Click Create topic.

    • Choose Standard as the topic type.

    • Give your topic a name (e.g., RDS-Alerts), then click Create topic.

  3. Subscribe Email to SNS Topic

    • Once the topic is created, select the topic from the list.

    • Click Create subscription.

    • For Protocol, select Email.

    • Enter your email address in the Endpoint field where notifications will be sent.

    • Click Create subscription.

  4. Confirm Subscription

    • Check your email for a confirmation message from AWS.

    • Click on the confirmation link to activate the subscription.

Create CloudWatch Alarm for RDS

  1. Open CloudWatch Console

    • Log into the AWS Management Console and navigate to CloudWatch.

  2. Create Alarm

    • In the CloudWatch dashboard, click on Alarms from the left-hand menu, then click Create alarm.

  3. Select a Metric

    • Click on Select metric.

    • Navigate to RDS > Per-Database Metrics > DBInstanceIdentifier to choose a specific database.

    • Select a relevant metric (e.g., CPU Utilization, Free Storage Space, Read IOPS, Write IOPS).

  4. Define Alarm Conditions

    • Set the Threshold type as either Static or Anomaly detection.

    • Choose the condition type:

      • For static thresholds, define a custom value, such as “CPU utilization > 80%”.

      • For anomaly detection, select the metric and let CloudWatch detect the anomaly.

  5. Configure Actions

    • Under the Actions section, choose Send a notification to an SNS topic.

    • Select the SNS topic you created earlier (e.g., RDS-Alerts).

  6. Set Alarm Name and Description

    • Name your alarm (e.g., RDS-CPU-High-Usage).

    • Optionally, you can add a description that dynamically includes the database name using ${DBInstanceIdentifier}.

  7. Review and Create

    • Review your alarm configuration and click Create alarm.

Common Metrics for RDS CloudWatch Alarms

  • CPUUtilization: Monitor high CPU usage.

  • FreeableMemory: Ensure your database has enough memory (RAM) available

  • FreeStorageSpace: Ensure your database has enough storage available.

  • DatabaseConnections: Track the number of open connections.

  • ReadIOPS / WriteIOPS: Monitor read and write I/O operations per second.

  • ReadLatency / WriteLatency: Monitor delays in read/write operations.

  • ReplicaLag: Monitor replication lag in a read-replica.