Sets up a daily email notification for cost anomalies based on absolute impact.

Terraform Template

resource "aws_ce_anomaly_monitor" "test" {
  monitor_dimension = "SERVICE"
  monitor_type = "DIMENSIONAL"
  name = "AWSServiceMonitor"
}

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

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

  threshold_expression {

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