I am trying to get started with the serverless framework. I followed the AWS quick start guide and instead of Nodejs, i am using python. However, am getting the following error while trying to invoke the function.
{
"errorMessage": "Unable to import module 'handler'"
}
--------------------------------------------------------------------
START RequestId: 630c20c2-573d-11e7-9012-39b5c641a4d4 Version: $LATEST
Unable to import module 'handler': No module named handler
END RequestId: 630c20c2-573d-11e7-9012-39b5c641a4d4
REPORT RequestId: 630c20c2-573d-11e7-9012-39b5c641a4d4 Duration: 0.22 ms Billed Duration: 100 ms Memory Size: 1024 MB Max Memory Used: 18 MB
Error --------------------------------------------------
Invoked function failed
For debugging logs, run again after setting the "SLS_DEBUG=*" environment variable.
Get Support --------------------------------------------
Docs: docs.serverless.com
Bugs: github.com/serverless/serverless/issues
Forums: forum.serverless.com
Chat: gitter.im/serverless/serverless
Your Environment Information -----------------------------
OS: linux
Node Version: 6.11.0
Serverless Version: 1.15.3
But, If I manually edit the function from the lambda editor and invoke it, it is not throwing any error. It is throwing an error only when invoking through the serverless framework.