lib/plugins/aws/invokeLocal/index.js/AwsInvokeLocal/invokeLocal
class AwsInvokeLocal:  invokeLocal() {
    const runtime = this.options.functionObj.runtime
      || this.serverless.service.provider.runtime
      || 'nodejs4.3';
    const handler = this.options.functionObj.handler;
    const handlerPath = handler.split('.')[0];
    const handlerName = handler.split('.')[1];

    if (runtime.startsWith('nodejs')) {
      return this.invokeLocalNodeJs(
        handlerPath,
        handlerName,
        this.options.data);
    }

    if (runtime === 'python2.7' || runtime === 'python3.6') {
      return this.invokeLocalPython(
        runtime,
        handlerPath,
        handlerName,
        this.options.data);
    }

    throw new this.serverless.classes
      .Error('You can only invoke Node.js & Python functions locally.');
  }