Reputation: 49
I'm trying to deploy this Cloudwatch Alarm and Health Check using Cloudformation, and I'm getting an error that the request is invalid for the Health Check, and can't understand why. Hoping someone could help me figure out the problem.
rEventBusCwAlarm:
Type: AWS::CloudWatch::Alarm
Properties:
ActionsEnabled: FALSE
AlarmDescription: Alarm that monitors the health of event busses in current region by counting Failed Invocations
ComparisonOperator: GreaterThanThreshold
EvaluationPeriods: 5
MetricName: FailedInvocations
Namespace: AWS/Events
Threshold: 10
Statistic: Sum
Period: 10
rEventBusHealthCheck:
Type: AWS::Route53::HealthCheck
Properties:
HealthCheckConfig:
Type: CLOUDWATCH_METRIC
InsufficientDataHealthStatus: Healthy
AlarmIdentifier:
Name: !Ref rEventBusCwAlarm
Region: !Sub ${pRegion}
This is the exact error I get:
Resource handler returned message: "Invalid request provided: AWS::Route53::HealthCheck" (RequestToken: 281f0512-ba1d-3c44-4c44-d371f07fae81, HandlerErrorCode: InvalidRequest)
Upvotes: 1
Views: 1541
Reputation: 10097
The issue is the alarm, rather than the health check. If you try to create this alarm NOT via Cloudformation you will get:
Only a period greater than 60s is supported for metrics in the "AWS/" namespaces
So change
Period: 10
to
Period: 60
(or more)
It looks like a Cloudformation bug, you should not be able to create that alarm.
Upvotes: 1