There was an release last year that bump the version of aws sdk from version 2 to 3. But in version 3 the lambda response payload is now unit8array (look at the discussion here) , so we need to convert the response before doing JSON.parse()
.e.g.
import { toUtf8 } from '@aws-sdk/util-utf8-node';
const rawHookResult = JSON.parse(toUtf8(invocationResponse.Payload))
There was an release last year that bump the version of aws sdk from version 2 to 3. But in version 3 the lambda response payload is now
unit8array
(look at the discussion here) , so we need to convert the response before doing JSON.parse().e.g.