AWS Lambda Expected response

Describe the issue/error/question

I am executing a lambda function as a node, the lambda runs fine, but n8n errors on the node

What is the error message

TypeError: Cannot read property 'errorMessage' of undefined
    at Object.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Aws/AwsLambda.node.js:170:59)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/src/WorkflowExecute.js:451:47

Please share the workflow

Share the output returned by the last node

I am expecting the data I returned at the end of my lambda

Information on your n8n setup

  • n8n version: 0.162.0
  • Database you’re using (default: SQLite): MySQL
  • Running n8n with the execution process [own(default), main]:
  • Running n8n via [Docker, npm, n8n.cloud, desktop app]: Docker

Hi @Chad, welcome to the community and thanks so much for reporting this! I quickly tested this and was able to reproduce the problem.

From taking a very first look this appears to be related to the Invokation Type value of Continue workflow. Would you be able to switch to Wait for results until this has been fixed?

Hi @MutedJam , thanks for the warm welcome

I will test and see if Wait for results causes something similar, do you perhaps have a template lambda function (preferably nodejs) that I could have a look at?

Hey @MutedJam

just concluded a test Wait for results does indeed work, thanks for this

1 Like

Glad to hear this works, thanks for confirming! In the meantime I have also added this problem to our internal bug tracker for a closer look.

The lambda function I was using to test this was an old one I found in our test account:

exports.handler = async (event, context) => {
    const name = event.name || 'n8n';
    return `Hello world!, this is ${name}`;
};

So nothing spectacular here, but enough to reproduce the problem.

Got released with [email protected]