Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
williamsia opened this issue May 17, 2024 · 1 comment

Comments

@williamsia
Copy link

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))
@philvarner
Copy link
Collaborator

Thanks for the report! Feel free to create a PR that fixes this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants