I’m running into an odd error with function that import aws-sdk. I have isolated this down to having to be caused by the dependency by creating a new function which only imports the module and then returns.
In some cases the function returns within a few hundred milliseconds, and sometimes the function takes 10-20 seconds to return. The issue starts when return is called as timing from start of function to just prior to calling return only takes about 100 milliseconds. This seems to be completely random as sometimes it returns very quickly, and others it takes a long time.
This causes functions which use aws-sdk to be un-usable because I cannot wait upwards of 20 seconds for the function to return and load data on the screen.