I'm using amplify mock from AWS Amplify to mock my AppSync with lambda functions for development purposes locally. This works great on many devices, but one colleague has a problem while executing one lambda function. We figured out that amplify mock uses an old node version to execute the lambda functions.
We created a complete new amplify project and added a simple lambda function (errortest) to get the nodejs version:
exports.handler = async (event) => JSON.stringify(process.version);
... and a GraphQL query to return the result:
type Query {
errortest: String @function(name: "errortest-${env}")
}
On my colleagues device this returns v12.22.7, on my device v16.14.0.
We both have the same node version installed: node -v returns v16.14.0 on both devices.
We share the exact same codebase. In the cloudformation template the confiured runtime is "Runtime": "nodejs14.x"
Any ideas how to fix this?
BR, Stefan