Home > Back-end >  AWS waf and cloudfront association doesn't show request data in the web ACL dashboard
AWS waf and cloudfront association doesn't show request data in the web ACL dashboard

Time:08-09

I have previously configured the AWS waf and its corresponding web ACL manually in the AWS dashboard and then associated it with a Cloudfront distribution and it worked perfectly. Now that I have created the process in Terraform and associated it with the same distribution (manually associated it), I get no data of the sampled requests in the web ACL dashboard. I have waited for over 48 hours from when I associated the web ACL with the Cloudfront distribution.

Any ideas on what could be wrong?

CodePudding user response:

From your Terraform code, you have to enable the sampled_requests_enabled attribute to have the sample data.

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

References:

  • Related