如何获取AWS层中exe文件的路径?

How to get the path of a exe file in AWS layer?

我正在尝试将 wkhtmltopdf 与 lambda 一起使用。我用这个结构创建了一个 zip 文件并制作了一个图层。

wkhtmltopdf.zip

├───bin
├───fonts
│   └───dejavu
└───lib

其中 wkhtmltopdf.exe 在 bin 文件夹中。我的代码,

pdfconf = pdfkit.configuration(wkhtmltopdf=os.getenv('PATH')+"/wkhtmltopdf.exe")

错误信息,

No wkhtmltopdf executable found: "/var/lang/bin:/usr/local/bin:/usr/bin/:/bin:/opt/bin/wkhtmltopdf.exe"

感谢您的宝贵时间。

根据OP的评论,正确的路径应该是/opt/bin/wkhtmltopdf.exe