lib/plugins/aws/package/compile/events/cloudWatchLog/index.js/AwsCompileCloudWatchLogEvents/longestCommonSuffix
class AwsCompileCloudWatchLogEvents:  longestCommonSuffix(logGroupNames) {
    const first = logGroupNames[0];
    const longestCommon = logGroupNames.reduce((last, current) => {
      for (let i = 0; i < last.length; i++) {
        if (last[i] !== current[i]) {
          return last.substring(0, i);
        }
      }
      return last;
    }, first);
    return longestCommon + ((longestCommon === first) ? '' : '*');
  }