other-lambdas.js
function succeedLambdaCallback(callback, response, event, context) {
  return executePreSuccessCallback(response, event, context)
    .then(() => callback(null, response))
    .catch(err => {
      console.error(`Unexpected failure after executePreSuccessCallback`, err);
      return callback(null, response);
    });
}
function succeedLambdaCallback(callback, response, event, context) {
  return executePreSuccessCallback(response, event, context)
    .then(() => callback(null, response))
    .catch(err => {
      console.error(`Unexpected failure after executePreSuccessCallback`, err);
      return callback(null, response);
    });
}
function succeedLambdaCallback ( callback , response , event , context ) { return executePreSuccessCallback ( response , event , context ) . then ( ( ) => callback ( null , response ) ) . catch ( err => { console . error ( ` ` , err ) ; return callback ( null , response ) ; } ) ; }
Succeeds the given callback of an AWS Lambda, by invoking the given callback with the given response.
@param {Function} callback - the callback function passed as the last argument to your Lambda function on invocation.
@param {Object} response - a normal or Lambda Proxy integration response to be returned
@param {AWSEvent} event - the AWS event passed to your handler
@param {StandardHandlerContext} context - the context to use
Succeeds the given callback of an AWS Lambda by invoking the given callback with the given response .