Hm... that stack trace looks a bit odd. The last stack frame says it is in a lambda, which the previous frame doesn't contain. Also I don't see how that exception could be raised from that line of code. My guess is that the running code that threw this exception differs somehow from the code on the filesystem, have you recently updated functions.py? Also can you provide the query-string parameters for the request that threw this error?