1

I created a project of AWS lambda in laravel using bref package and i am getting the following

error
{
    "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: Array\n(\n    [code] => 12345\n)\n",
    "stack": [
        "#0 /var/task/vendor/bref/bref/src/Event/Http/HttpHandler.php(20): Bref\\Event\\Http\\HttpRequestEvent->__construct()",
        "#1 /var/task/vendor/bref/bref/src/Runtime/LambdaRuntime.php(106): Bref\\Event\\Http\\HttpHandler->handle()",
        "#2 /opt/bootstrap(35): Bref\\Runtime\\LambdaRuntime->processNextEvent()",
        "#3 {main}"
    ]
}
shruti
  • 56
  • 6
  • 1
    How do you invoke the lambda? – Fabian Bettag Aug 11 '20 at 15:15
  • @FabianBettag I added an API gateway with the API link in the function. Also created a resource of the method in the IAM user lambda function console. – shruti Aug 12 '20 at 04:10
  • I have tried adding the mapping template as { "body" : $input.json('$') } for the application/x-www-form-urlencoded but it makes no differance – shruti Aug 12 '20 at 04:11

0 Answers0