Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 'use strict';
- const myModule = require('./myModule');
- exports.handler = (event, context, lambdaCB) => {
- // Simply use the function of 'myModule' and return the error embeded
- myModule.myFunction(event, (err, data) => {
- if (err) {
- return lambdaCB(new Error(`myFunction failed with message : {err.message}`));
- }
- return lambdaCB();
- });
- };
Add Comment
Please, Sign In to add comment