I've set up a function in AWS Lambda that acts as a request handler, receiving HTTP requests via AWS API Gateway.
I would like to keep this 'path' completely unmodified, but also have a second Lambda function to receive (duplicates of) all these requests. The responses of those second (parallel) function invocations could be neglected - the other Lambda function is the one that counts. (I would be interested in knowing the responses of both functions though.)
Reason for this requirements is that I want both functions to be executed (possibly in parallel, but that doesn't matter) and be able to compare the results of these two functions.
I can't figure out how to set up this in AWS Lambda (or in AWS API Gateway, which could have been possible as well).
In some web application frameworks like Express (JavaScript), Sinatra (Ruby) or Flask (Python) there are capabilities like resp. global request handlers, before_requests() and before() filters which are close to what I want to achieve.
How can this be done in AWS Lambda (and/or AWS API Gateway)?