Skip to content

Instantly share code, notes, and snippets.

@oh-sky
Created October 18, 2015 15:05
Show Gist options
  • Save oh-sky/3c881b4528a41d2a8cd4 to your computer and use it in GitHub Desktop.
Save oh-sky/3c881b4528a41d2a8cd4 to your computer and use it in GitHub Desktop.
aws-lambda-hello-pl
print "Hello world.\n"
exports.handler = function(event, context) {
var exec = require('child_process').exec;
exec('perl hello.pl', function (error, stdout, stderr) {
if(stdout){
console.log('stdout: ' + stdout);
}
if(stderr){
console.log('stderr: ' + stderr);
}
if (error !== null) {
console.log('Exec error: ' + error);
}
context.succeed(stdout);
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment