-
Notifications
You must be signed in to change notification settings - Fork 294
Closed
Labels
Description
Hi, I followed the documentation on how to package individually, but it seems that is not working. Here's my serverless.yml
, closely matching the example on README:
service: test
provider:
name: aws
runtime: python3.6
memorySize: 128
plugins:
- serverless-python-requirements
custom:
pythonRequirements:
dockerizePip: true
zip: true
package:
individually: true
functions:
func1:
handler: index.handler
module: function1
events:
- http:
path: /func1
method: get
func2:
handler: index.handler
module: function2
events:
- http:
path: /func2
method: get
And here's my folder structure:
├── function1
│ ├── index.py
│ └── requirements.txt
├── function2
│ ├── index.py
│ └── requirements.txt
├── package.json
├── serverless.yaml
└── yarn.lock
When I make a request to the func1
or func2
I get an internal server error with the following logs on both
functions:
START RequestId: 6cf2a302-702d-11e8-abcd-2f24ab6d943e Version: $LATEST
Unable to import module 'index': No module named 'index'
END RequestId: 6cf2a302-702d-11e8-abcd-2f24ab6d943e
I wonder what I'm doing wrong. Thanks!