Writing Code
Example Microservice Function
exports.handler = function(event, context, callback) {
// An important setting that tells the process to end once callback() is executed.
context.callbackWaitsForEmptyEventLoop = false;
console.log('Hello, World');
// Ends the Microservice successfully.
callback(null, 'success');
/**
* Notes:
* callback(err) ends Microservice with error
* event object contains any data passed into the Microservice
*/
}