lib/plugins/aws/invokeLocal/index.js/AwsInvokeLocal/validateFile
class AwsInvokeLocal:  validateFile(filePath, key) {
    const absolutePath = path.isAbsolute(filePath)
      ? filePath
      : path.join(this.serverless.config.servicePath, filePath);
    if (!this.serverless.utils.fileExistsSync(absolutePath)) {
      throw new this.serverless.classes.Error('The file you provided does not exist.');
    }

    if (absolutePath.endsWith('.js')) {
      // to support js - export as an input data
      this.options[key] = require(absolutePath); // eslint-disable-line global-require
    } else {
      this.options[key] = this.serverless.utils.readFileSync(absolutePath);
    }
  }