在 AWS LAMBDA 中使用 SQLAlchemy
Using SQLAlchemy in AWS LAMBDA
我正在尝试在 AWS Lambda 函数中使用 SQL Alchemy,但它抛出错误:
module not found.
此外,我还附加了我在压缩后部署到 Lambda 层的文件夹结构。
我正在使用以下命令为 lambda 层创建文件夹。
pip3 install sqlalchemy --target Alchemy_layer/
图层需要不同的文件夹结构according to the documentation。
试试这个:
pip3 install sqlalchemy --target python/
zip -r sqlalchemy-layer.zip python/
将该 ZIP 作为图层上传,然后重试。
我正在尝试在 AWS Lambda 函数中使用 SQL Alchemy,但它抛出错误:
module not found.
此外,我还附加了我在压缩后部署到 Lambda 层的文件夹结构。
我正在使用以下命令为 lambda 层创建文件夹。
pip3 install sqlalchemy --target Alchemy_layer/
图层需要不同的文件夹结构according to the documentation。
试试这个:
pip3 install sqlalchemy --target python/
zip -r sqlalchemy-layer.zip python/
将该 ZIP 作为图层上传,然后重试。