mirror of
https://github.com/serverless/serverless.git
synced 2026-01-18 14:58:43 +00:00
20 lines
478 B
JavaScript
20 lines
478 B
JavaScript
'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/index.js');
|
|
|
|
// Modularized Code
|
|
var action = require('./index.js');
|
|
|
|
// Lambda Handler
|
|
module.exports.handler = function(event, context) {
|
|
action.run(event, context, function(error, result) {
|
|
return context.done(error, result);
|
|
});
|
|
};
|