Skip to content
Advertisement

Getting error when executing a lambda function – Parameter “userId” has value with no field set

I guess I am making a silly coding mistake, but have been trying for more than a day. I am trying to insert records onto aurora table with the parameters received as a stream from dynamodb table.

I cant seem to set the parameters on the params object correctly. I want the sql statement and the parameters on the params object to be set outside params as the right statement depends on if it is an INSERT, MODIFY or REMOVE. Here is my code –

JavaScript

Please advise!

Advertisement

Answer

Looking at examples in the documentation, you need to prefix the parameter placeholders with :. Like this:

JavaScript
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement