lundi 25 mai 2015

How to correctly configure Route53 HealthCheck Alarm with CF (in Sydney)

I've configured a Route53 HealthCheck with an associated alarm with CloudFormation, but the resulting healthcheck shows as having No alarms configured, and the alarms in the CloudWatch console remain dead. If I manually create the alarm in HealthChecks, everything works.

Worse, if I switch from Sydney/ap-southeast-2 and create the same cloud formation stack in North Virginia/us-east-1, the alarm is correctly associated with the health check and everything works!

My simplified stack looks like this:

{
  "AWSTemplateFormatVersion": "2010-09-09",
  "Description": "healthcheck alarm test",
  "Resources": {
    "StatusHealthCheck": {
      "Type": "AWS::Route53::HealthCheck",
      "Properties": {
        "HealthCheckConfig": {
          "Port": "80",
          "Type": "HTTP",
          "ResourcePath": "/status",
          "FullyQualifiedDomainName": "testdomain.com",
          "RequestInterval": "30",
          "FailureThreshold": "1"
        },
        "HealthCheckTags": [
          {
            "Key": "Name",
            "Value": "status reachability check"
          }
        ]
      }
    },
    "StatusHealthCheckFailedAlarm": {
      "Type": "AWS::CloudWatch::Alarm",
      "Properties": {
        "ActionsEnabled": "true",
        "AlarmDescription": "alarmed when status doesn't respond",
        "ComparisonOperator": "LessThanThreshold",
        "EvaluationPeriods": "1",
        "MetricName": "HealthCheckStatus",
        "Namespace": "AWS/Route53",
        "Period": "60",
        "Statistic": "Minimum",
        "Threshold": "1.0",
        "Dimensions": [
          {
            "Name": "HealthCheckId",
            "Value": {
              "Ref": "StatusHealthCheck"
            }
          }
        ]
      }
    }
  }
}

Is there any reason it should work in North Virginia but not in Sydney?




Aucun commentaire:

Enregistrer un commentaire