amazon web services - Can bash script be written inside a AWS Lambda function -
can write bash script inside lambda function? read in aws docs can execute code written in python, nodejs , java 8.
it mentioned in documents might possible use bash there no concrete evidence supporting or example
something might help, i'm using node call bash script. uploaded script , nodejs file in zip lambda, using following code handler.
exports.myhandler = function(event, context,callback) { const execfile = require('child_process').execfile; const child = execfile('./test.sh', (error, stdout, stderr) => { if (error) { callback(error); } callback(null,stdout); }); } you can use callback return data need.
Comments
Post a Comment