Alex Latchford
Alex Latchford

Reputation: 655

"Basic health checks must not have an metric region specified."

Cross posting from: https://forums.aws.amazon.com/thread.jspa?threadID=280944

Hello!

Getting the following error when adding a new HealthCheck that is connected to an alarm. (See attached screenshot for more info).

Invalid parameter : Basic health checks must not have an metric region specified.

The config I'm using:

...

  AlertsEmailTopic:
    Type: AWS::SNS::Topic
    Properties:
      DisplayName: !Join ['', ['ApiServiceAlerts-', !Ref "AWS::StackName"]]
      Subscription:
      -
        Endpoint: [email protected]
        Protocol: email

  ApiHealthCheckDownAlarm:
    Condition: CreateProdResources
    Type: AWS::CloudWatch::Alarm
    Properties:
      ActionsEnabled: true
      AlarmActions:
      - !Ref AlertsEmailTopic
      ComparisonOperator: LessThanThreshold
      EvaluationPeriods: 1
      Namespace: AWS/Route53
      MetricName: HealthCheckStatus
      Period: 300
      Statistic: Minimum
      Threshold: 1
      TreatMissingData: breaching

  HealthCheckApi:
    Condition: CreateProdResources
    Type: AWS::Route53::HealthCheck
    Properties:
      HealthCheckConfig:
        Port: "443"
        Type: "HTTPS"
        ResourcePath: /
        FullyQualifiedDomainName: api.example.com
        RequestInterval: "30"
        FailureThreshold: "3"
        AlarmIdentifier:
          Name: !Ref ApiHealthCheckDownAlarm
          Region: us-west-2
      HealthCheckTags:
      -
        Key: "Name"
        Value: "https://api.example.com"

The only other useful info I've seen specifically for aws-cli but I can't work out how to translate the fix into Cloudformation. See https://forums.aws.amazon.com/thread.jspa?messageID=834963&tstart=0

Many thanks, Alex

Upvotes: 0

Views: 1218

Answers (1)

Michael - sqlbot
Michael - sqlbot

Reputation: 179124

Route 53 health check alarms are always in us-east-1, because that is the region where Route 53 delivers the health check metrics to CloudWatch, regardless of where the monitored target is or which regions you have selected for health checkers.

You can't specify another region, here, and the error message suggests that no region should be specified.

Upvotes: 1

Related Questions