You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a lambda that is called through API Gateway, but can also be invoked directly via a lambda client. Upgrading to 2.12.0 started causing this error when invoked via client.
[ERROR] TypeError: argument of type 'NoneType' is not iterable
Traceback (most recent call last):
File "/var/task/apig_wsgi/__init__.py", line 61, in handler
if "requestContext" in event and "elb" in event["requestContext"]:
This is being done from Kotlin code, using com.amazonaws.services.lambda.AWSLambda client. When an AwsProxyRequest object is constructed, it has requestContext=null by default. This results in the error above.
I can update my invoke code to set a dummy requestContext, but I do believe it is valid to be None in the direct lambda invocation use case. Does it make sense to add a not None check here for requestContext?
Thanks.
The text was updated successfully, but these errors were encountered:
Python Version
3.8
Package Version
2.12.0
Description
I have a lambda that is called through API Gateway, but can also be invoked directly via a lambda client. Upgrading to 2.12.0 started causing this error when invoked via client.
This is being done from Kotlin code, using
com.amazonaws.services.lambda.AWSLambda
client. When anAwsProxyRequest
object is constructed, it hasrequestContext=null
by default. This results in the error above.I can update my invoke code to set a dummy requestContext, but I do believe it is valid to be None in the direct lambda invocation use case. Does it make sense to add a
not None
check here for requestContext?Thanks.
The text was updated successfully, but these errors were encountered: