You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am having this issue where I cant invoke lambda functions through aws sdk invoke command and neither trhough my step functions.
I am using async invocations and is not only with the lambda, I also tried with step functions. I wrapped the lambda invocation command in a try catch and nothing happens, dont even throw an error, just hang there.
classLambdaServiceimplementsILambdaService{asyncinvokeLambdaEvent(payload: Payload): Promise<Response>{try{constparams: InvokeCommandInput={FunctionName: process.env.AWS_LAMBDA_NAME!,Payload: JSON.stringify(payload),InvocationType: "Event",};constcommand=newInvokeCommand(params);console.info("Invoking Lambda with payload:",payload);constresponse=awaitlambdaClient.send(command);console.info("Lambda invoked with response: ",response);return{statusCode: response.StatusCode};}catch(error){console.error("Error invoking Lambda:",error);return{statusCode: 500};}}}
Above is my code. The problem its on the lambdaClient.send command, just hangs there... The log message bellow it is never called.
Its weird because this service is called through a server action function. When I call the server action from the a client component the service works as expected (step functions in this case), however when I call through my api endpoint (a payment webhook api endpoint) it just hangs (this also happens with step functions execution). I know the service is being called because the log messages are printed until the lambdaClient.send(command) is hit
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Question
I am having this issue where I cant invoke lambda functions through aws sdk invoke command and neither trhough my step functions.
I am using async invocations and is not only with the lambda, I also tried with step functions. I wrapped the lambda invocation command in a try catch and nothing happens, dont even throw an error, just hang there.
Above is my code. The problem its on the lambdaClient.send command, just hangs there... The log message bellow it is never called.
Its weird because this service is called through a server action function. When I call the server action from the a client component the service works as expected (step functions in this case), however when I call through my api endpoint (a payment webhook api endpoint) it just hangs (this also happens with step functions execution). I know the service is being called because the log messages are printed until the
lambdaClient.send(command)
is hitHere is an issue in the nextjs repo: issue
Beta Was this translation helpful? Give feedback.
All reactions