node-red-contrib-aws icon indicating copy to clipboard operation
node-red-contrib-aws copied to clipboard

PutRecord Kinesis passing data does not handle the payload

Open francoisneron opened this issue 2 years ago • 2 comments

Kinesis node seems to not handle the data passed by other nodes or set values. It only supports static text in the form field.

francoisneron avatar Apr 09 '22 17:04 francoisneron

Seems like this is pretty prevalent in this project. I had the same problems with the SQS node.

In the case of SQS, the value from the static form field is overridden if the input message has a "MessageBody"-value that is not null, which could be easily achieved using a function node. For Kinesis, it looks like adding a field with the name "Data" to the input message will give you the desired results. It would probably look something like:

return { Data: JSON.stringify(msg.payload) };

Palmeltveit avatar Jun 08 '22 15:06 Palmeltveit

All nodes are generated directly from the AWS API specification, so should behave the same way. One common issue I've seen (had myself in the start) is to make sure that the parameter names are exactly as specified in the AWS javascript api spec (case included). AWS api typically uses InitialUpperCase.

Unfortunately the api doesn't lend itself to chaining calls directly without a function or similar node

Daniel-t avatar Sep 18 '22 19:09 Daniel-t