I trigger a lambda function via API gateway and everything works perfectly with the one exception that the very first time I trigger it on a given day it fails.

Strangely, the lambda function logs don't show any errors. I get my usual `START` log statement and then the request and context of the trigger, then after 5s, it ends unexpectedly.

When I look into the API gateway logs this is the error it returns:

> 
> Lambda execution failed with status 200 due to customer function error: 2018-12-10T11:00:31.208Z cc233168-fc9n-11fc-a05a-577bb4sd2b2ccc Task timed out after 5.01 seconds.
> 
> 
> 

Has anyone encountered a similar problem? What is customer function error and how may I resolve this?