-
-
Save jwulf/d73318465a2b14f3136a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
/** | |
* AWS Module: Action: Lambda Handler | |
* "Your lambda functions should be a thin wrapper around your own separate | |
* modules, to keep your code testable, reusable and AWS independent" | |
*/ | |
require('jaws-core-js/env'); | |
// Modularized Code | |
var action = require('./index.js'); | |
// Lambda Handler | |
module.exports.handler = function(event, context) { | |
action.run(event, context).then(function(result) { | |
return context.done(null, result); | |
}).error(function(error){ | |
return context.done(error, null) | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment