1
votes

I am trying to deploy a python file using Zappa. The python file inturn calls an executable which is in the same directory as the python file. It works fine when I run it locally using ngrok but it fails when deployed with Zappa. I understand that we can use this workaround for executables in aws lambda using node js. How can I do it using python?

class ChessGame:
    board = chess.Board()
    engine = chess.uci.popen_engine("stockfish-8-64")
1
Did you try using os.chdir()? - Haochen Wu

1 Answers

0
votes

You can create your deployment package by using virtual env.

Refer this AWS documentation for more details. http://docs.aws.amazon.com/lambda/latest/dg/lambda-python-how-to-create-deployment-package.html