-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Description
Using Localstack PRO with Serverless Framework, every other HTTP call to a GET endpoint results in a 502 Bad Gateway with the following error logged:
2020-03-26T13:52:59:ERROR:localstack.services.generic_proxy: Error forwarding request: 'NoneType' object has no attribute 'headers' Traceback (most recent call last):
File "/opt/code/localstack/localstack/services/generic_proxy.py", line 247, in forward
listener_result = listener.forward_request(method=method,
File "/opt/code/localstack/.venv/lib/python3.8/site-packages/localstack_ext/services/apigateway/apigateway_extended.py", line 64, in forward_request
AttributeError: 'NoneType' object has no attribute 'headers'
This seems like it may be related to #2064
Just to reiterate, the error only occurs every other call starting with the second call. Also, switching to the community edition eliminates the problem.
Serverless.yml:
service: HelloWorld
plugins:
- serverless-localstack
custom:
localstack:
host: http://localhost
stages:
- local
stages:
- local
- prod
provider:
name: aws
runtime: dotnetcore2.1
region: us-east-1
stage: ${opt:stage, 'local'}
package:
individually: true
functions:
hello:
handler: CsharpHandlers::AwsDotnetCsharp.Handler::HelloWorldAsync
package:
artifact: artifact/helloworld-lambda-csharp.zip
events:
- http:
path: helloworld
method: GET
cors: true