I get access denied when I run a node.js function on AWS Lambda. I am uploading a zip file which contains the index.js and the node module packets.
Have run through this twice now and still get same error as below so any help is appreciated.
{
"errorMessage": "EACCES: permission denied, open '/var/task/read.js'",
"errorType": "Error",
"stackTrace": [
"Object.fs.openSync (fs.js:549:18)",
"Object.fs.readFileSync (fs.js:393:15)"
I got the same problems weeks ago.
Appears that setting file permissions on .js files before zipping solves this error.
Run: filename.js chmod -R 644
in your Terminal
Hope this saves someone else time & effort.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With