[英]How to run an executable in aws lambda?
I am trying to deploy a python file using Zappa. 我正在尝试使用Zappa部署python文件。 The python file inturn calls an executable which is in the same directory as the python file.
python文件反过来调用与python文件位于同一目录中的可执行文件。 It works fine when I run it locally using ngrok but it fails when deployed with Zappa.
当我使用ngrok在本地运行它时,它工作正常,但与Zappa一起部署时,它失败。 I understand that we can use this workaround for executables in aws lambda using node js.
我了解我们可以使用节点js在AWS Lambda中的可执行文件中使用此解决方法 。 How can I do it using python?
如何使用python做到这一点?
class ChessGame:
board = chess.Board()
engine = chess.uci.popen_engine("stockfish-8-64")
You can create your deployment package by using virtual env. 您可以使用虚拟环境创建部署程序包。
Refer this AWS documentation for more details. 请参阅此AWS文档以获取更多详细信息。 http://docs.aws.amazon.com/lambda/latest/dg/lambda-python-how-to-create-deployment-package.html
http://docs.aws.amazon.com/lambda/latest/dg/lambda-python-how-to-create-deployment-package.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.