Guest User

Untitled

a guest
Nov 18th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. 'use strict';
  2.  
  3. const myModule = require('./myModule');
  4.  
  5. exports.handler = (event, context, lambdaCB) => {
  6. // Simply use the function of 'myModule' and return the error embeded
  7. myModule.myFunction(event, (err, data) => {
  8. if (err) {
  9. return lambdaCB(new Error(`myFunction failed with message : {err.message}`));
  10. }
  11. return lambdaCB();
  12. });
  13. };
Add Comment
Please, Sign In to add comment