Configures a daily email alert for cost anomalies using a percentage threshold to trigger notifications.

Terraform Template

resource "aws_ce_anomaly_subscription" "test" {
  frequency = "DAILY"
  monitor_arn_list = ["aws_ce_anomaly_monitor.test.arn"]
  name = "AWSServiceMonitor"

  subscriber {
    address = "abc@example.com"
    type = "EMAIL"
  }

  threshold_expression {

    dimension {
      key = "ANOMALY_TOTAL_IMPACT_PERCENTAGE"
      match_options = ["GREATER_THAN_OR_EQUAL"]
      values = ["100"]
    }
  }
}