Skip to content

Instantly share code, notes, and snippets.

@ericorruption
Created August 28, 2018 13:39
Show Gist options
  • Select an option

  • Save ericorruption/938196c5d70b849a874860e000917c03 to your computer and use it in GitHub Desktop.

Select an option

Save ericorruption/938196c5d70b849a874860e000917c03 to your computer and use it in GitHub Desktop.
aws lambda: separate handler logic from function code
function MyLambdaFunction (foo, bar) {
// MyLambdaFunction logic here
}
exports.myHandler = function(event, context, callback) {
var foo = event.foo;
var bar = event.bar;
var result = MyLambdaFunction (foo, bar);
callback(null, result);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment