CloudWatch Alarm and SNS Configuration

CloudWatch Alarm

The CloudWatch alarm monitors the Route53 HealthCheckStatus metric for the primary health check. It uses Minimum statistic over a 60-second period with a threshold of 1. Missing data is treated as breaching (fail-safe behavior). When the alarm transitions to ALARM state, it publishes to the SNS topic which invokes the Lambda.

Key details:

  • Region: us-east-1 (Route53 metrics are only available in us-east-1)

  • Missing data: Treated as breaching (fail-safe)

SNS Topic

A cross-region SNS topic in us-east-1 bridges the CloudWatch alarm to the Lambda function:

  • Name: ${cluster_name}-dr-failover-sns

  • Region: us-east-1 (same as CloudWatch alarm)

  • Publisher: CloudWatch Alarms service

  • Subscriber: Lambda function (cross-region invocation to us-east-2)

SNS Topic Policy:

  • Allows cloudwatch.amazonaws.com to publish alarm notifications

  • Allows lambda.amazonaws.com to subscribe