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
When executing a function with zappa.async.run in a non lambda environment an error is raised. This seems to happen due to the fact that zappa tries to run the function in the lambda environment even if it's not in the lambda environment. When using the @task decorator this works as expected since there is a direct invokation of the function if AWS_LAMBDA_FUNCTION_NAME env variable is not present.
Expected Behavior
The function should be invoked directly, without errors, in a non lambda environment.
Actual Behavior
The function fails with error
Invalid type for parameter FunctionName, value: None, type: <class 'NoneType'>, valid types: <class 'str'>
if (service in ASYNC_CLASSES) and (lambda_function_name):
send_result = ASYNC_CLASSES[service](lambda_function_name=lambda_function_name,
aws_region=aws_region,
capture_response=capture_response).send(task_path, args, kwargs)
return send_result
else: # For local exexution
return func(*args, **kwargs)
Your Environment
Zappa version used: 0.47.1
Operating System and Python version: 3.6
The text was updated successfully, but these errors were encountered:
Context
When executing a function with zappa.async.run in a non lambda environment an error is raised. This seems to happen due to the fact that zappa tries to run the function in the lambda environment even if it's not in the lambda environment. When using the @task decorator this works as expected since there is a direct invokation of the function if AWS_LAMBDA_FUNCTION_NAME env variable is not present.
Expected Behavior
The function should be invoked directly, without errors, in a non lambda environment.
Actual Behavior
The function fails with error
Possible Fix
Change this code:
Zappa/zappa/async.py
Line 350 in 4cf80b2
to
(copied from @task decorator)
Your Environment
The text was updated successfully, but these errors were encountered: