-
Notifications
You must be signed in to change notification settings - Fork 621
Closed
Labels
Description
Describe the bug
Produces error when calling InvokeCommand with Payload type UInt8Array
SDK version number
Gamma 6
Is the issue in the browser/Node.js/ReactNative?
Node.js
Details of the browser/Node.js/ReactNative version
v14.5.0
To Reproduce (observed behavior)
await lambda.send(new InvokeCommand({
FunctionName: '<FunctionName>',
Payload: new TextEncoder().encode('abc') //Uint8Array
}))
(node:54212) UnhandledPromiseRejectionWarning: TypeError [ERR_INVALID_ARG_TYPE]: The "chunk" argument must be of type string or an instance of Buffer. Received an instance of Uint8Array
await lambda.send(new InvokeCommand({
FunctionName: '<FunctionName>',
Payload: '"abc"' as any
}))
Works as expected
Expected behavior
Payload with UInt8Array type to not throw error or change Payload type to string | Buffer