invokeFunctionHelper function is accepting request payload but not passing it in the request object
Closed this issue · 3 comments
The correct code should pass the payload in the request object. Add the bolded line.
const request = {
functionId: functionId,
invokeFunctionBody: JSON.stringify(payload)
}
Thanks for reporting this @ramjiiyengar - we'll take a look and get back
@ramjiiyengar - In this particular example, payload
will always be a string since it's accessed from the environment variable. Hence, it doesn't help to add the above line in the code. Since, invokeFunctionBody
only accepts Uint8Array | Buffer | Blob | stream.Readable | ReadableStream | string
, the user should convert the request payload object to the appropriate format.
@ramjiiyengar - Since the example works in the way it's intended to be used, we're going to close this issue. Feel free to reopen it if you face any issues.