Node.js put records to Kinesis with infinite retry strategy.
There is no obvious bug but;


You are defining functions both within the return structure and outside of it, which makes it hard to read/parse, just keep it clean and define everything outside of it
You are sending records in a function called putRecord, that is not good.
500 should probably be a constant retrieved with config, same thing for 200
Using numbers.random() sounds like a terrible idea, you should use a library that generates GUID's (https://www.npmjs.com/package/guid)
Why assign config.kinesis.streamName to streamName, just assign it straight in the structure. It is one less line of code, and the reader does not have to wonder where it comes from
I would have re-ordered the 500 check and the assignment:

records  = records.splice(0, 500);

let payloadRecords = {
  Records: records,
  StreamName: streamName
};


instead of 

let payloadRecords = {
  Records: records,
 StreamName: streamName
};

if (records.length &gt;= 500) {
  const pushingToKinesis = records.splice(0, 500);
  payloadRecords.Records = pushingToKinesis;
} else {
  records = []
}


personally I would even go for

//Make sure we never send more than 500 records, splice keeps the rest in records
let payloadRecords = {
  Records: records.splice(0, 500),
  StreamName: streamName
};



Finally, I am not a big fan of perpetually re-sending the data. If the data gets rejected because of data-content, then at some point if you reach 500 entries that will never be stored, your pipe will filled with junk and you will stop transmitting store-able data.