admin管理员组文章数量:1289832
I have created a lambda layer for the requests package and testes - I have successfully gotten this to work for requests, but cannot get the pyodbc package to work.
I have tried to create a package for pyodbc using the exact same method:
- new directory
- create venv
- install venv
- copy lib dir from venv to new folder called "python"
- ensure the path matches .html i.e. python/lib/python3.10/site-packages
- zipped python to python.zip
- uploaded python.zip as lambda layer
- attached pyodbc lambda layer to lambda function
I am still getting the error
Response:
{
"errorMessage": "Unable to import module 'lambda_function': No module named 'pyodbc'",
"errorType": "Runtime.ImportModuleError",
"requestId": "",
"stackTrace": []
}
At this point in my test with requests
I was now getting a successful response.
What am I missing?
本文标签: pythonhow to get pyodbc running in lambda layerStack Overflow
版权声明:本文标题:python - how to get pyodbc running in lambda layer? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741426634a2378115.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论