By using AWS re:Post, you agree to the Terms of Use
/Block suspicious(specific) user-agent using AWS WAF/

Block suspicious(specific) user-agent using AWS WAF


I want to block all requests with suspicious user-agent to access APIGW. For example, how can I make rule to block all requests with user-agent as


or other version of python-requests

1 Answers
Accepted Answer

The simplest way to do this is to create a string match condition and then check the User-Agent header against that condition.

answered 3 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions