AWS Lambda Functions in Go
var exec = require('child_process').exec; | |
console.log('Loading event'); | |
exports.handler = function(event, context) { | |
eventJSON = JSON.stringify(event); | |
exec('./test ' + eventJSON, function callback(error, stdout, stderr) { | |
console.log('stdout: ' + stdout); | |
console.log('stderr: ' + stderr); | |
if(error !== null) { | |
console.log('exec error: ' + error); | |
} | |
context.done(null, "Hello World"); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment