Process every record from kinesis as b64 buffer
parent
b9cb7ebf41
commit
57b8dc34f5
File diff suppressed because one or more lines are too long
|
|
@ -144,7 +144,7 @@ class AWS {
|
||||||
for (let index = 0; index < records.Records.length; index++) {
|
for (let index = 0; index < records.Records.length; index++) {
|
||||||
const element = records.Records[index];
|
const element = records.Records[index];
|
||||||
core.info(JSON.stringify(element.Data));
|
core.info(JSON.stringify(element.Data));
|
||||||
core.info(Buffer.from(element.Data.toString('utf8'), 'utf8').toString());
|
core.info(AWS.ab2str(element.Data));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -166,5 +166,9 @@ class AWS {
|
||||||
core.info(`log: ${log}`);
|
core.info(`log: ${log}`);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static ab2str(buf) {
|
||||||
|
return String.fromCharCode.apply(undefined, new Uint16Array(buf));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
export default AWS;
|
export default AWS;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue