Miserlou / Zappa

Serverless Python
https://blog.zappa.io/
MIT License
11.89k stars 1.21k forks source link

How to invoke or schedule functions from non wsgi app #2146

Closed manycoding closed 3 years ago

manycoding commented 3 years ago

Context I have some code for automation https://github.com/manycoding/page-followers. I'd like to invoke functions to test from different files. I noticed when I run zappa invoke dev "anything but lambda_handler" it actually invokeslambda_handler`. Same with scheduling.

Expected Behavior

I'd like to be able to execute any function from any file deployed with zappa, not just lambda_handler.

Actual Behavior

lambda_handler is executed

manycoding commented 3 years ago

The solution was to remove "lambda_handler" from zappa_settings.json

LaundroMat commented 3 years ago

So if lambda_handler is not the default, you cannot remotely execute any other function? Maybe this issue should be reopened, no?

manycoding commented 3 years ago

I don't remember if lambda_handler is default. I could not execute any other function with lambda_handler or app_function in the zappa_settings.json. See my config here https://github.com/manycoding/tomorrowswig_followers/blob/master/zappa_settings.json