I am building an application with AWS lambda and the serverless framework. My folder structure looks like this when deployed:
service-dev-lambdaname (name of top level dir)
|__lib
|__serverless.yml
|__python-library-1
|__python-library-2
|__src
|__lambda
When I run serverless deploy
, it correctly packages and uploads my service. It uses the naming convention {service name}-dev-{function name}
. This is not the name of the parent folder locally so it is messing up the imports. I thought that instead, I should move everything into src
but the serverless plugin packages libraries like python-library-1
and python-library-2
and places them outside src
. Is there a way to change the naming convention to fix these import errors?