0

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).

TDao
  • 514
  • 4
  • 13
  • That depends entirely on how your application is written, lambda itself has very little / nothing to do with that. – luk2302 Jun 03 '22 at 05:57
  • @luk2302 well, let's say if I have a gateway to route requests to my lambda, how would I re-route the invalid requests then? – TDao Jun 03 '22 at 06:14
  • just want to clarify, I'd like to do it generically, instead of having to individually define API gateway proxy event for every invalid v1 requests to route to v2. Also, not all v1 requests are invalid, so I wouldn't be able to use wildcard. – TDao Jun 03 '22 at 06:25

0 Answers0