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
5
votes
2 answers

AWS SAM - AWS::WAFv2::WebACLAssociation - AWS WAF couldn?t perform the operation because your resource doesn?t exist

We are trying create a AWS::WAFv2::IPSet in our SAM template. WhitelistedIPAddressesIPSet: Type: AWS::WAFv2::IPSet Properties: Description: 'Merchant IPs' Scope: REGIONAL IPAddressVersion: IPV4 Addresses:…
Pontus Espe
  • 51
  • 1
  • 2
5
votes
1 answer

AWS ACL/WAF - How to Change Rule Priority?

I have a WAF ACL associated with my application load balancer and I'd like to change the priority of the rules. For the life of me I can't find any documentation on how this is done and can't figure out how to adjust the priority in the AWS UI. Is…
totalhack
  • 2,298
  • 17
  • 23
5
votes
2 answers

Prevent image hotlinking with S3 and CloudFront

I have a website with many pages where each page has many images (dozens or even hundreds). I'm trying to avoid image hotlinking, but without increasing AWS costs too much. So far I found 3 options: Option 1: Use WAF to prevent hotlinking, by…
5
votes
1 answer

Applying WebACL to API Gateway

I have a problem with finding a mistake. I'm trying to connect WafACL to API Gateway Deployment and I'm using such command: aws wafv2 associate-web-acl --web-acl-arn d3b11jj1-30c6-46ae-8e58-6a90ae69eeaf --resource-arn…
Pal Kol
  • 75
  • 2
  • 6
4
votes
2 answers

Create a WebACL from WAFv2 with CloudFormation

I am trying to create a WebACL with cloudformation in order to protect the application API from abuse, the idea is throttle the API access for a maximum of 100 request for ip in 5 minutes. For this purpose I have to use WAFv2 because the first…
Newbie
  • 43
  • 1
  • 5
4
votes
2 answers

How to use AWS WAF to block certain URLs

I am trying to use AWS WAF to block requests with certain URL patterns. I am using the string matching filter, but it is not blocking the requests. I must be doing it incorrectly. Here is what I am trying to block: https://xxx.domain.com/ A good…
Pete Lunenfeld
  • 1,557
  • 3
  • 19
  • 32
4
votes
3 answers

Environment health has transitioned from Ok to Severe. 81.8 % of the requests are erroring with HTTP 4xx

I would like to ask for help about Elastic Beanstalk error: Environment health has transitioned from Ok to Severe. 81.8 % of the requests are erroring with HTTP 4xx. I read some articles here and I followed the solution with WAF, so I created ACL…
David Roušar
  • 81
  • 1
  • 6
3
votes
1 answer

searching key / value pairs in CloudWatch Insight for WAF logs

So, the AWS Cloudfront WAF logs get sent to AWS Cloud Insights. How can I search the random placement of the key / value pairs for the httpRequest array? Example log looks like this: httpRequest.headers.0.name host httpRequest.headers.0.value…
3
votes
0 answers

Can I bypass WAF rules for a specific URL in Cloud Armor?

I would like to bypass certain WAF rules to be applied for a specific URL. For example, the following requests are creating a false positive as they have some "string" in the payload triggering the rule "owasp-crs-v030001-id933160-php". POST…
Titu
  • 176
  • 7
3
votes
1 answer

AWS WAF: How to make custom response code with managed rules for block actions

AWS added the option to return custom status code, instead of the default 403. From here: https://aws.amazon.com/blogs/security/customize-requests-and-responses-with-aws-waf/ I added custom status for my own rules, but it seems like for managed…
user2503775
  • 4,267
  • 1
  • 23
  • 41
3
votes
3 answers

Error creating WAFv2 WebACL WAFInvalidParameterException

Error: Error creating WAFv2 WebACL: WAFInvalidParameterException: Error reason: You have used none or multiple values for a field that requires exactly one value., field: RULE_ACTION, parameter: RuleAction(block=null, allow=null, count=null) { …
louis benagha
  • 67
  • 1
  • 8
3
votes
2 answers

AWS WAF: How to block requests that do not contain a particular header using Terraform

I want to block requests that do not contain Authorization header. I came up with the following rule but I see that the requests which do not contain this header are also being allowed. What is the correct way to specify this condition? rule { …
bdev03
  • 375
  • 1
  • 4
  • 19
3
votes
1 answer

Request blocked on azure waf when form fields have values as json strings

I have a form which has some input fields. Some of the input fields have json strings as values like [{"actionItems":"1","actions":"Go To Home","articleLink":""}, {"actionItems":"2","actions":"Rollback","articleLink":""}] But when I submit this…
prasoon
  • 901
  • 8
  • 25
3
votes
1 answer

wafv2 webacl cloudformation gets error when I tried to attach the rulegroup I created

I wrote this cloudformation and it keeps giving me this error Error reason: A reference in your rule statement is not valid., field: RULE, parameter: Statement (Service: Wafv2, Status Code: 400, Request ID: 8f88058f-556e-4fec-baf2-9a84d0353bbe,…
3
votes
2 answers

How to whilelist specific IP addresses from AWS WAF

We have a web application which is protected by aws WAF. Our company network are blocked more often than not due to reach the threshold. We have a team working with the web app, of course we are much easier to reach the threshold. So, I want to…
Huodong
  • 523
  • 8
  • 23
1
2
3
17 18