I am setting up a chatbot in AWS Lex. The inputs for Lex are handled by a Lambda function (Main). Depending on the intent, an API may need to be called.
I was wondering whether it would be best practice to simply return the intent and slots from Lex into Main, and let Main handle the API call. Alternatively, Lex can finalise and run a lambda function for each intent. However, my worry for this is maintainability as it could be difficult to manage many functions and also, these various functions may be seldom used and will need to be cold-started; increasing latnecy.
An additional problem is that I need the lambda making the API call to be in a different region to Main and Lex, as Lex is unavaliable in that region (Sydney). As such, I feel averse to daisy chaining Lambda functions as it would go Main -> Lex -> Lambda (Fulfilment) -> Lambda (Sydney API call).
Would appreciate any advice, Thanks