I am connecting slack to an api gateway that triggers a lambda function. In the slack api spec it says that events must have a 2XX response within 3 seconds so it is best to handle sending the response to the event and the 2XX confirmation of receival response separate. The solution I am thinking about right now would be to have an automatic 200 response from the api gateway when an event is received and also trigger a lambda function that could use the slack api to respond. Is it possible to trigger a lambda function and have a different response that can be sent before the lambda is done executing?
A possible solution I have thought of is having a lambda function that returns 2XX receival response and then this lambda will call another lambda to send the actual response. Is this the best solution?