lib/utils/yamlAstParser.js/parseAST
const parseAST = (ymlAstContent, astObject) => {
  let newAstObject = astObject || {};
  if (ymlAstContent.mappings && _.isArray(ymlAstContent.mappings)) {
    _.forEach(ymlAstContent.mappings, (v) => {
      if (!v.value) {
        const errorMessage = [
          'Serverless: ',
          `${chalk.red('Your serverless.yml has an invalid value with key:')} `,
          `${chalk.red(`"${v.key.value}"`)}`,
        ].join('');
        log(errorMessage);
        return;
      }

      if (v.key.kind === 0 && v.value.kind === 0) {
        newAstObject[findKeyChain(v)] = v.value;
      } else if (v.key.kind === 0 && v.value.kind === 2) {
        newAstObject[findKeyChain(v)] = v.value;
        newAstObject = parseAST(v.value, newAstObject);
      } else if (v.key.kind === 0 && v.value.kind === 3) {
        newAstObject[findKeyChain(v)] = v.value;
        newAstObject = parseAST(v.value, newAstObject);
      }
    });
  } else if (ymlAstContent.items && _.isArray(ymlAstContent.items)) {
    _.forEach(ymlAstContent.items, (v, i) => {
      if (v.kind === 0) {
        const key = `${findKeyChain(ymlAstContent.parent)}[${i}]`;
        newAstObject[key] = v;
      }
    });
  }

  return newAstObject;
};