Skip to content

When prehook is configured, it throws an exception when the api parsing the response from prehook lambda #771

@williamsia

Description

@williamsia

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))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions