After installing lambda-audio via
npm install lambda-audio --save
I uploaded the lambda function via ZIP upload into my LambdaFunction. When trying to run this command
lambdaAudio.sox('./existingfile.mp3').then(response => {console.log("sox response: "+response); // Do something with the info}).catch(errorResponse => {console.log('Error from the sox command:', errorResponse)})
I get the following error in my CloudWatch Log console.
It seems it is an file permission (chmod) issue. Make sure sox file has 755 permission.
Can you do chmod on before the deployment and also in Lambda (ofc. via Node script execution)?
After installing lambda-audio via
npm install lambda-audio --save
I uploaded the lambda function via ZIP upload into my LambdaFunction. When trying to run this command
lambdaAudio.sox('./existingfile.mp3')
.then(response => {
console.log("sox response: "+response); // Do something with the info
})
.catch(errorResponse => {
console.log('Error from the sox command:', errorResponse)
})
I get the following error in my CloudWatch Log console.
Error from the sox command: { Error: spawn EACCES
at _errnoException (util.js:1022:11)
at ChildProcess.spawn (internal/child_process.js:323:11)
at Object.exports.spawn (child_process.js:502:9)
at Promise (/var/task/node_modules/lambda-audio/lib/spawn.js:7:34)
at new Promise (<anonymous>)
at spawnPromise (/var/task/node_modules/lambda-audio/lib/spawn.js:6:10)
at invokeCommand (/var/task/node_modules/lambda-audio/lib/lambda-audio.js:9:12)
at Object.sox (/var/task/node_modules/lambda-audio/lib/lambda-audio.js:17:10)
at Object.LaunchRequest (/var/task/index.js:166:25)
at emitNone (events.js:106:13) code: 'EACCES', errno: 'EACCES', syscall: 'spawn' }
Does anybody know whats wrong? How can I fix it?