Daniel-t / node-red-contrib-aws

A collection of Node-RED nodes for AWS.
Apache License 2.0
56 stars 59 forks source link

PutRecord Kinesis passing data does not handle the payload #86

Open francoisneron opened 2 years ago

francoisneron commented 2 years ago

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

Palmeltveit commented 2 years ago

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) };

Daniel-t commented 2 years ago

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