我将依赖项包含在lambda中,但仍然出现此错误:
这就是我所做的:
1.我跑了:pip3 install hvac --target sources/segment/hvac
2.在我的serverless.yml文件中:
package:
include:
- hvac/**
- psycopg2/**
3。我跑了sls deploy
4.我看到了文件夹:
但是当我在aws上运行lambda时,我得到:
Response:
{
"errorMessage": "Unable to import module 'handler': cannot import name 'Client' from 'hvac' (unknown location)",
"errorType": "Runtime.ImportModuleError"
}