question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to determine event source based for running an async lambda function

See original GitHub issue

Dear Reader,

I have gotten the following error when trying to configure a function to run async, running it sync does work.

Any ideas why this is happening?

{
    "errorType": "Error",
    "errorMessage": "Unable to determine event source based on event.",
    "stack": [
        "Error: Unable to determine event source based on event.",
        "    at getEventSourceNameBasedOnEvent (/var/task/node_modules/@vendia/serverless-express/src/event-sources/utils.js:79:9)",
        "    at proxy (/var/task/node_modules/@vendia/serverless-express/src/configure.js:37:51)",
        "    at Runtime.handler (/var/task/node_modules/@vendia/serverless-express/src/configure.js:95:12)",
        "    at Runtime.handleOnce (/var/runtime/Runtime.js:66:25)"
    ]
}

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
JeffMLcommented, Nov 2, 2022

I tried the solution offered here and it worked for me. Does not seem like the correct way to do it, though.

1reaction
aliamranicommented, Sep 1, 2021

Hi Vince,

I just ran into the same issue and for our case, in which we invoke our Lambdas through API Gateway, enabling the “Use Lambda Proxy integration” option in the integration request of the method did the job for me.

Hope it helps.

Read more comments on GitHub >

github_iconTop Results From Across the Web

lambda gives "Unable to determine event source based on ...
Hi all, When deploying using serverless with serverless-api-gateway-caching like so: functions: graphql: handler: src/handler.
Read more >
apollo-server-lambda: Unable to determine event source ...
Within serverless-express, in src/event-sources/utils.js, there is a function called getEventSourceNameBasedOnEvent(), which is throwing the ...
Read more >
Unable to determine event source based on event. (apollo ...
I have this issue after updating to apollo-server-lambda@3^ “Error: Unable to determine event source based on event.” This code used to work ...
Read more >
Troubleshoot invocation issues in Lambda
Invocation errors can be caused by issues with request parameters, event structure, function settings, user permissions, resource permissions, or limits. If you ...
Read more >
Asynchronous invocation - Amazon Lambda
Lambda manages the function's asynchronous event queue and attempts to retry on errors. If the function returns an error, Lambda attempts to run...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found