Lambda.invoke Syntax
const AWS = require('aws-sdk'); exports.handler = (event, context, callback) => { var lambda = new AWS.Lambda({region: 'us-east-1', apiVersion: '2015-03-31'}); var params = { FunctionName: 'paypal-payout-impatient-deploy-dev-hello', InvocationType: 'RequestResponse', Payload: JSON.stringify({'email': '[email protected]', 'amount': 1.00, 'currency': 'USD'}) } lambda.invoke(params, function(err, data){ console.log(err); console.log('here'); }).promise().then(data=> { callback(null, {message:'done'}); }); };