When the Lambda node execute, it will throw unknow error as show below. The AWS Credential works fine as it was able to get the list to functions. I also manage to get the correct response in Postman using the same IAM account and same Lambda function.
NodeApiError: UNKNOWN ERROR - check the detailed error for more information
at Object.awsApiRequest (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Aws/GenericFunctions.js:23:15)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async Object.awsApiRequestREST (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Aws/GenericFunctions.js:28:22)
at async Object.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Aws/AwsLambda.node.js:159:38)
at async Workflow.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/Workflow.js:658:28)
at async /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:585:53
Information on your n8n setup
**n8n version:0.202.1
**Database you’re using (default: SQLite): postgresql
**Running n8n with the execution process [own(default), main]:own
**Running n8n via [Docker, npm, n8n.cloud, desktop app]:docker
Oh, that’s not a helpful error message of course
Anything more useful in your server logs? If not, could you share your Lambda node (simply select it on your n8n canvas and press Ctrl+C to copy it, then insert the result here in the forum) and confirm how your function looks like?
NodeApiError: UNKNOWN ERROR - check the detailed error for more information
at Object.awsApiRequest (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Aws/GenericFunctions.js:23:15)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at Object.awsApiRequestREST (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Aws/GenericFunctions.js:28:22)
at Object.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Aws/AwsLambda.node.js:159:38)
at Workflow.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/Workflow.js:658:28)
at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:585:53
Server Logs
Initializing n8n process
n8n ready on 0.0.0.0, port 5678
Version: 0.206.1
Editor is now accessible via:
http://localhost:5678/
Error "Error: not a number" when casting workflow ID to a number
Error "Error: not a number" when casting workflow ID to a number
Error "Error: not a number" when casting workflow ID to a number
I tested the function from AWS Console and it works as expected and I tested the above policy in AWS policy simulator and it allows invocation of function “GetLightsailInstanceState”.