Decode kinesis data

pull/218/head
Frostebite 2021-02-07 19:21:32 +00:00
parent 54a6a57c49
commit a4bb7ec75b
2 changed files with 3 additions and 3 deletions

File diff suppressed because one or more lines are too long

View File

@ -145,7 +145,7 @@ class AWS {
if (records.Records.length > 0) {
for (let index = 0; index < records.Records.length; index++) {
const record = records.Records[index].Data;
core.info(record.buffer.toString('utf8'));
core.info(AWS.ab2str(record.buffer));
}
}
await new Promise((resolve) => setTimeout(resolve, 3000));
@ -172,7 +172,7 @@ class AWS {
}
static ab2str(buf) {
return String.fromCharCode.apply(undefined, new Uint16Array(buf));
return String.fromCharCode.apply(undefined, new Uint8Array(buf));
}
}
export default AWS;