brefphp / laravel-bridge

Package to use Laravel on AWS Lambda with Bref
https://bref.sh/docs/frameworks/laravel.html
MIT License
314 stars 63 forks source link

This handler expected to be invoked with a API Gateway or ALB event. Instead, the handler was invoked with invalid event data: null #69

Open robbietorinit opened 2 years ago

robbietorinit commented 2 years ago

Hi Everyone, I am trying to configure an API Gateway for my multiple micro-services in Laravel by Bref. However when after configuring the API gateway with the correct resources pointing to the correct lambda function. I am getting the following error and am not able to come to a solution. Please help?

{ "errorType": "Bref\\Event\\InvalidLambdaEvent", "errorMessage": "This handler expected to be invoked with a API Gateway or ALB event. Instead, the handler was invoked with invalid event data: null", "stackTrace": [ "#0 /var/task/vendor/bref/bref/src/Event/Http/HttpHandler.php(23): Bref\\Event\\Http\\HttpRequestEvent->__construct()", "#1 /var/task/vendor/bref/bref/src/Runtime/Invoker.php(29): Bref\\Event\\Http\\HttpHandler->handle()", "#2 /var/task/vendor/bref/bref/src/Runtime/LambdaRuntime.php(91): Bref\\Runtime\\Invoker->invoke()", "#3 /opt/bootstrap(43): Bref\\Runtime\\LambdaRuntime->processNextEvent()", "#4 {main}" ] }

I have also configure custom domain name and did the correct API mappings.