I have an API gateway which is a kind of url shortner, it accepts all the get requests and return the long url associated with that short url path. example
input GET => xxx.com/abc
return => aaa.com/blablablabla
I want to implement some validation on this so that I don't get unnecessary junk requests based on path with a regular expression
suppose path should start with "a" in incoming request xxx.com/abc
How can I do that via api gateway request validator, any help
You better try Lambda Authorizer for requests validator.
Your Lambda function will have 2 main tasks
Lambda supports various of languages: Python3, Go, Java, Node.js ... so you are freely to use ReGex to filter your requests.
Reference: https://docs.aws.amazon.com/apigateway/latest/developerguide/configure-api-gateway-lambda-authorization-with-console.html