how to re-route (not redirect) invalid API request with AWS lambda?

130 Views Asked by At

How or where can I define re-route rules for invalid requests to my lambda without sending the 30x status code to the client?

For example, if there is a request to api/v1/hello, which is invalid, I want it to be re-routed to the handler/controller of api/v2/hello, which is valid.

In ASP.Net, I can write custom routing logic in my service startup code but I haven't been able to find a way to do so with AWS lambda (I'm writing my lambda in Java).

0

There are 0 best solutions below