Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error from the sox command in lambda function #3

Open
DanMittendorf opened this issue Aug 8, 2018 · 1 comment
Open

Error from the sox command in lambda function #3

DanMittendorf opened this issue Aug 8, 2018 · 1 comment

Comments

@DanMittendorf
Copy link

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?

@stojanovic
Copy link
Owner

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)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants