I'm trying to create an alarm for AppRunner. My AppRunner service is running fine.
Here is the code for the alarm. It keeps showing "Insufficient data". Weirdly enough, creating an alarm manually also results in the same no data message. I've tried memory metrics but same thing. Any ideas?
resource "aws_cloudwatch_metric_alarm" "apprunner_cpu" {
alarm_name = "<redacted>"
comparison_operator = "GreaterThanOrEqualToThreshold"
evaluation_periods = 2
metric_name = "CPUUtilization"
namespace = "AWS/AppRunner"
period = 60
statistic = "Average"
threshold = 80
alarm_description = "AppRunner CPU utilization"
insufficient_data_actions = []
dimensions = {
ServiceName = aws_apprunner_service.main.service_name
ServiceID = aws_apprunner_service.main.service_id
}
}