After updating to version 5.6.0 of serverless-offline it loads correctly my functions paths (rest api handlers), but when I invoke them (through Postman) the actual handlers are never invoked, it just returns 200 and null as the response body.
We downgraded to a previous version and it works well again.
Here is the serverless.yml file for the test:
service: test
#frameworkVersion: ">=1.1.0 <2.0.0"
provider:
name: aws
runtime: python3.6
functions:
ola:
handler: todos/list.list
events:
- http:
path: ola
method: get
plugins:
- serverless-offline
And here is the handler code (python):
import json
def list(event, context):
response = {
"statusCode": 200,
"body": json.dumps('Was ist passiert?')
}
return response
thanks @Rafaelsk ! I guess we missed to test python 馃槙
@dnalborczyk I'm glad to know I could help.
@Rafaelsk I was under the assumption that v5.6.0 broke your environment, but it seems this bug has been lingering around for a while.
I just reverted a commit which broke the functionality. should be fixed with the next release. (note: there still seems to be a timeout issue.)
from npm: I fairly safe version to use should be v5.4.2 (until master is released)
v5.6.1
@dnalborczyk Alright. Thanks. I'll try again on the next version.