Here are some reasons for these timeouts:

  1. Attempting to process too much information within the 3-second window.
  2. Database retrieval. Pulling data and processing can sometimes eat up what remains from that 3-second window.

However, by using an API gateway, you now have plenty of time to process the data because Slack will get the response immediately.

By first going through the API Gateway, you can respond immediately to Slack while sending a copy to SQS, triggering the Lambda with the SQS message. This gives your lambda plenty of time to process data, look up information, make requests, or do whatever it needs to do to provide a response back to the originating channel or perhaps another Slack channel.

No timeouts, just a nice workflow that you could wire in any logic.

Category
Tags

Comments are closed