Describe the bug
When I run amplify mock function <functionName>, I get the following output:
<functionName> failed with the following error:
Command failed with exit code 1: /usr/local/bin/node /usr/local/lib/node_modules/@aws-amplify/cli/node_modules/amplify-nodejs-function-runtime-provider/lib/utils/execute.js
However, it seems like the function runs fine because I get the following output on the next line:
{"result":{"statusCode":200,"body":"\"Hello from Lambda!\""},"error":null}
It also says: Finished execution.
Amplify CLI Version
4.29.2
To Reproduce
amplify init
amplify add function
amplify mock function
Expected behavior
No errors
Desktop (please complete the following information):
Additional context
Clean install, clean amplify project.
@alexboulay Thanks for issue, I was able to reproduce we are investigating and will have an update soon.
I'm running into the same issue too.
I'm still seeing this exact error on all 4.29.x CLI versions including 4.29.7
Had to downgrade to 4.28.2 where it works
Most helpful comment
I'm running into the same issue too.