Implements a Web ACL to protect against account takeover attempts using AWS managed rules focused on login paths.

Terraform Template

resource "aws_wafv2_web_acl" "atp-example" {
  description = "Example of a managed ATP rule."
  name = "managed-atp-example"

  rule {
    name = "atp-rule-1"
    priority = 1

    visibility_config {
      cloudwatch_metrics_enabled = false
      metric_name = "friendly-rule-metric-name"
      sampled_requests_enabled = false
    }
  }
  scope = "CLOUDFRONT"

  visibility_config {
    cloudwatch_metrics_enabled = false
    metric_name = "friendly-metric-name"
    sampled_requests_enabled = false
  }
}