function getFileContentAndStat(directory, filePath) {
  const fullPath = `${directory}/${filePath}`;

  return BbPromise.all([
    // Get file contents and stat in parallel
    readFileAsync(fullPath),
    statAsync(fullPath)
  ]).then(
    result => ({
      data: result[0],
      stat: result[1],
      filePath
    }),
    error => {
      throw new this.serverless.classes.Error(
        `Cannot read file ${filePath} due to: ${error.message}`,
        'CANNOT_READ_FILE'
      );
    }
  );
}
Copy pasted from Serverless

@see https://github.com/serverless/serverless/blob/63d54e1537e10ae63c171892edd886f6b81e83f6/lib/plugins/package/lib/zipService.js#L112