Questions tagged [amazon-waf]

AWS WAF is a web application firewall service that monitors web requests for Amazon CloudFront distributions and restricts access to content. Use AWS WAF to block or allow requests based on conditions, such as the IP addresses that requests originate from or values in the requests.

Documentation: https://aws.amazon.com/documentation/waf/

258 questions
35
votes
3 answers

Elastic Beanstalk Change ELB Type

Does anyone know if it's possible to change an existing AWS Elastic Beanstalk environment to an Application Load Balancer (instead of a classic one). As far as I know only Application ELB's can be protected with AWS WAF and DDOS "Shield" so any…
David
  • 7,652
  • 21
  • 60
  • 98
17
votes
4 answers

AWS Cloudfront (with WAF) + API Gateway: how to force access through Cloudfront?

I want to put WAF in front of API Gateway, and with the (little) info I find that is only possible by manually putting an extra Cloudfront distribution with WAF enabled, in front of APIG. It's a bit of a shame, especially since APIG now supports…
16
votes
3 answers

How to add AWS WAF to an ALB via CloudFormation

I can't find any examples or documentation on how to associate a WAF with an ALB via CloudFormation. Supposedly its possible going by this news announcement…
15
votes
2 answers

error updating CloudFront Distribution (E32RNPFGEUHQ6J): InvalidWebACLId: Web ACL is not accessible by the requester

I am using terraform to create a web-acl in aws and want to associate that web-acl with CloudFront distribution. So, here's how my code looks like: provider "aws" { alias = "east1" region = "us-east-1" } #…
Jananath Banuka
  • 2,951
  • 8
  • 57
  • 105
12
votes
6 answers

AWS WAF Getting 403 forbidden error while trying to upload an image

We have enabled AWS WAF solution before my ALB and have SQL injection and XSS detection enabled. We have tried to setup a custom rule to check if the content-type is multipart/form-data* using regex. We have set that custom rule with higher…
Boopathi N
  • 298
  • 2
  • 4
  • 16
12
votes
3 answers

AWS WAF How to rate limit path by IP below the minimum of 2000 requests/minute

I have a path (mysite.com/myapiendpoint for sake of example) that is both resource intensive to service, and very prone to bot abuse. I need to rate limit access to that specific path to something like 10 requests per minute per client IP address.…
user5071535
  • 1,312
  • 8
  • 25
  • 42
11
votes
2 answers

Associate AWS WAFv2 web acl to ApiGatewayV2

I want to associate a WAFv2 Web ACL to an API GatewayV2 HTTP stage. Following the terraform docs, I tried this: resource "aws_wafv2_web_acl_association" "this" { resource_arn = aws_apigatewayv2_stage.this.arn web_acl_arn =…
8
votes
3 answers

is there any way I associate aws ELB/ALB with WAF ACL using terraform?

I created the following AWS WAF ACL and I want to associate it with my ALB using terraform. is there any way I can do it using terraform? I want to block all requests except the ones that have secret key using amazon web service web application…
Abereham
  • 141
  • 3
  • 9
7
votes
1 answer

Cloud Formation Support for Rate-Based WAF Rule

I want to set up a Cloud Formation in aws to attach a Rate Based Rule to my LB. I have been reading the AWS documentation for hours, and I know how to create a regular WAF Rule in Cloud Formation and attach them to my LB in Cloud Formation. The…
xyz
  • 524
  • 10
  • 22
7
votes
1 answer

How to integrate CloudFront distribution to AWS WAF by using CloudFormation?

I am trying to add CloudFront distribution to AWS WAF by using CloudFormation and have tried this, "Type": "AWS::WAFRegional::WebACLAssociation", "Properties": { "ResourceArn":…
6
votes
0 answers

AWS WAF ... how to improve results

I have a website served via AWS CloudFront. I've been getting a ton of entries in my nginx logs that look something like this: nginx_1 | 103.241.51.144 - - [09/Aug/2020:16:03:08 +0000] "GET /mysql/admin/index.php HTTP/1.1" 200 2311 "-"…
hugo
  • 1,175
  • 1
  • 11
  • 25
6
votes
3 answers

AWS WAF XSS check blocking form with "ON" keyword in form field value

Posting a form with " on" or any word starting with "on" as last word in a form field resulting in an XSS block from aws waf blocked by this rule Body contains a cross-site scripting threat after decoding as URL e.g. "twenty only" or " online" or…
kishor laskar
  • 63
  • 1
  • 5
6
votes
4 answers

SAM API Gateway with Cloudformation WAFRegional

To secure our API, I'm trying to deploy a WAFRegional with a RateBasedRule. The API Gateway is located in a SAM template wherein I have also a nested stack for the child template holding the WAFRegional configurations. The child template for the…
MartinaW
  • 335
  • 3
  • 11
6
votes
1 answer

How to use AWS WAF with Application ELB

I need to use AWS WAF for my web application hosted on AWS to provide additional rule based security to it. I couldnt find any way to directly use WAF with ELB and WAF needs Cloudfront to add WEB ACL to block actions based on rules. So, I added my…
5
votes
2 answers

How to secure an HTTP based API Gateway in AWS

There are two versions of the AWS API Gateway: REST version HTTP version (v2) I am using the newer HTTP version with a lambda authorizer and would like to protect my staging/test environments from outside requests. One idea is to put a WAF in…
1
2 3
17 18