lib/plugins/aws/package/compile/events/cloudFront/index.js/AwsCompileCloudFrontEvents/validate
class AwsCompileCloudFrontEvents:  validate() {
    this.serverless.service.getAllFunctions().forEach(functionName => {
      const functionObj = this.serverless.service.getFunction(functionName);
      if (functionObj.events.find(event => event.cloudFront)) {
        if (functionObj.memorySize && functionObj.memorySize > 128) {
          throw new Error(
            `"${functionName}" memorySize is greater than 128 which is not supported by Lambda@Edge functions`
          );
        }
        if (functionObj.timeout && functionObj.timeout > 5) {
          throw new Error(
            `"${functionName}" timeout is greater than 5 which is not supported by Lambda@Edge functions`
          );
        }
      }
    });
  }