Can't run binary from within python aws lambda function

前端 未结 6 1737
一生所求
一生所求 2021-01-11 16:57

I am trying to run this tool within a lambda function: https://github.com/nicolas-f/7DTD-leaflet

The tool depends on Pillow which depends on imaging libraries not av

6条回答
  •  栀梦
    栀梦 (楼主)
    2021-01-11 17:32

    There were two issues here. First, as per Jeshan's answer, I had to move the binary to /tmp before I could properly access it.

    The other issue was that I'd ran pyinstaller on ubuntu, creating a single file. I saw elsewhere some comments about being sure to compile on the same architecture as the lambda container runs. Therefore I ran pyinstaller on ec2 based on the Amazon Linux AMI. The output was multiple .os files, which when moved to tmp, worked as expected.

提交回复
热议问题