Decode kinesis data

pull/218/head
Frostebite 2021-02-07 22:49:06 +00:00
parent a649bb151c
commit d2aca81d39
2 changed files with 4 additions and 2 deletions

File diff suppressed because one or more lines are too long

View File

@ -144,9 +144,11 @@ class AWS {
iterator = records.NextShardIterator;
if (records.Records.length > 0) {
for (let index = 0; index < records.Records.length; index++) {
core.info(
let json = JSON.parse(
zlib.gunzipSync(Buffer.from(records.Records[index].Data, 'base64')).toString('utf8'),
);
if("DATA_MESSAGE")
core.info(json.message,);
}
}
await new Promise((resolve) => setTimeout(resolve, 3000));