Skip to content

Confusion about CloudWatch alarm behavior in Aurora when no DBInstanceIdentifier is specified.

0

Hi Team,

I am managing Amazon Aurora (MySQL) global clusters. Each cluster has 1 writer and 2 reader instances.

While creating CloudWatch alarms for Aurora metrics (like CPUUtilization, FreeableMemory, etc.), I noticed that:

When I select a metric with the dimension DBInstanceIdentifier, the alarm clearly ties to a specific instance.

But when I create an alarm without specifying any instance name (i.e., no DBInstanceIdentifier or DBClusterIdentifier dimension shown), the metric name alone appears — for example:

Namespace: AWS/RDS

Metric Name: CPUUtilization

(No DBInstanceIdentifier or DBClusterIdentifier shown)

In this case, my question is:

Will this alarm trigger if any one of the Aurora instances (writer or readers) crosses the threshold, or will it not monitor any of them properly?

Basically, I want to confirm the expected behavior when a CloudWatch alarm is created without specifying a dimension for Aurora clusters.

Example:

Aurora global cluster: aurora-prod-global

Writer: aurora-writer-1

Readers: aurora-reader-1, aurora-reader-2

Metric: CPUUtilization

Alarm: Created without DBInstanceIdentifier

Will CloudWatch automatically apply this to all three DB instances, or is it linked to none unless a specific identifier is chosen?

I checked the AWS documentation for RDS/Aurora CloudWatch dimensions, but it doesn’t explicitly mention what happens if we omit the dimension. Could someone from AWS confirm the intended and supported behavior for this case?

Regards,

Krishnakumar K

3 Answers
0

When you create a CloudWatch alarm for Aurora without specifying any dimensions (like DBInstanceIdentifier or DBClusterIdentifier), the alarm will not function as expected for monitoring your Aurora instances.

For Aurora specifically, CloudWatch requires dimensions to properly monitor your database resources. Without dimensions, the alarm won't be associated with any specific DB instance or cluster, and therefore won't effectively monitor any of your Aurora instances (neither the writer nor the readers).

Instead of creating alarms without dimensions, Aurora best practices recommend using role-based metrics with the DBClusterIdentifier, Role dimension combination. This approach allows you to set up alarms that monitor all instances with a specific role (WRITER or READER) within your cluster. This is particularly valuable for Aurora since instance roles can change over time due to failovers.

For example, you could create separate alarms for:

  • All WRITER instances in your aurora-prod-global cluster
  • All READER instances in your aurora-prod-global cluster

This role-based approach is more resilient than creating individual alarms for specific DB instances, as it continues to work properly even if specific instances change roles during failover events.

If you need to monitor all instances in your cluster regardless of role, you should use the DBClusterIdentifier dimension. If you need to monitor specific instances, use the DBInstanceIdentifier dimension.
Sources
Creating CloudWatch alarms to monitor Amazon Aurora - Amazon Aurora
Cloudwatch alarm for all the databases | AWS re:Post
Received "ALARM: "FreeSpace90GBAlarm" in US East (Ohio)" but can't tell which RDS instance | AWS re:Post
Amazon CloudWatch dimensions for Aurora - Amazon Aurora

answered 9 months ago

  • I have an Aurora Global Cluster with one writer and two reader instances.

    If I create a CloudWatch alarm using the DBClusterIdentifier dimension, will the alarm trigger if any one of the instances (writer or readers) crosses the threshold?

    Or does it only apply to cluster-level metrics (like AuroraReplicaLag) and not to instance-level metrics such as CPUUtilization or FreeableMemory?

    Also, if I use DBInstanceIdentifier, it will monitor only that specific instance (either writer or reader), correct?

    In my account, only one global cluster exists (one writer + two readers). In this case, if I create an alarm with DBClusterIdentifier only, what exactly will happen?

0

Hi,

when you create an alarm, if you mention a specific metric like CPUUtilization without specifying all of its dimensions, the alarm will NOT work, because it expects the metric definition to match a unique metric. If you want to alarm on multiple metrics, you need to use an SQL query instead: see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Create_Metrics_Insights_Alarm.html For example you can create a single alarm that will monitor all of your instances and tell you which instance breaks the threshold with something like that: SELECT AVG(CPUUtilization) FROM AWS/RDS WHERE EngineName = '...' GROUP BY DBInstanceIdentifier ORDER BY AVG() DESC;

AWS

answered 9 months ago

0

Hi,

To provide additional guidance,

  1. The Aurora cluster level and instance level metrics are defined in the document - https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Aurora.AuroraMonitoring.Metrics.html
  2. For metrics like CPU Utilization, the general guidance would be to use role-based metrics, again depends on your requirements. Details regarding the Aurora metrics data by using difference dimension is referred in this document, https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/dimensions.html
  3. If monitoring of individual aurora instances are important, using DBInstanceIdentifier dimension will definitely monitor only that specific instance.

Enabling Alarm for DBCluster level CPU Utilization metric can aggregate for all the instances, writer and reader, but it would not help in case when writer is above 80%, but 2 readers are only at 20%, then the DBCluster level CPU Utilization metric would be only 40%. Here, probability of alerting the writer issue can get masked and impact the DB performance. Since it always one writer, alarm on DBClusterIdentifier, Role for WRITER can alert in such scenario.

Similarly if there are multiple reader instances, then the alarm on DBClusterIdentifier, Role for READER would aggregate and can mask if one reader instance is having high CPU Utilization and if critical read workload is being processed. So, based on your requirements, the alarm can be enabled, if high CPU Utilization for any of the aurora DB instances needs to be alerted, setting up at each instance level would be the good approach, otherwise DBClusterIdentifier, Role for READER/WRITER can be considered.

AWS

answered 9 months ago

AWS
EXPERT

reviewed 9 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.