Process every record from kinesis as buffer

pull/218/head
Frostebite 2021-02-07 17:18:01 +00:00
parent 90f58d532b
commit 9b89651db1
2 changed files with 5 additions and 4 deletions

File diff suppressed because one or more lines are too long

View File

@ -141,9 +141,10 @@ class AWS {
.promise(); .promise();
iterator = records.NextShardIterator; iterator = records.NextShardIterator;
if (records.Records.length > 0) { if (records.Records.length > 0) {
core.info(JSON.stringify(records)); for (let index = 0; index < records.Records.length; index++) {
core.info(JSON.stringify(records.Records[0].Data.data)); const element = records.Records[index];
core.info(records.Records[0].Data.data); core.info(Buffer.from(element.Data).toString());
}
} }
} }