Search code examples
pythonamazon-web-servicesaws-lambdaconnexion

AbstractApp.__call__() missing 1 required positional argument: 'send' connexion 3 and python lambda function aws api gateway


Recently upgraded from connexion version 2 to version 3. Based on official documents in https://connexion.readthedocs.io/en/latest/index.html major change in architecture happend. my problem:

when using zappa to deploy python lambda function in aws, this general error Error: Warning! Status check on the deployed lambda failed. A GET request to '/' yielded a 500 response code. happens. in clouldwatch log review i see also general comment AbstractApp.__call__() missing 1 required positional argument: 'send'.

Any idea?


Solution

  • Connexion 3 migrated from the WSGI to the ASGI interface, which does not seem to be supported by Zappa.

    You can either use an adapter middleware to run Connexion through WSGI (docs) or switch to a Zappa alternative like Magnum which supports ASGI.