I have a node lambda function from which i'am running a bash script.
'use strict';
const exec = require('child_process').exec;
exports.handler = (event, context, callback) => {
const message = event.message;
const child = exec('./bs.sh ' + message, function(err, stdout, stderr) {
console.log(stdout);
console.log(stderr);
});
};
When i run this, i get /bin/sh: ./bs.sh: Permission denied
. I tried changing permissions with chmod 777 bs.sh
before zipping the function, but that too didn't work. Is it a limitation of lambda or an error in my approach?