lib/plugins/aws/rollbackFunction/index.js/AwsRollbackFunction/getFunctionToBeRestored
class AwsRollbackFunction:  getFunctionToBeRestored() {
    const funcName = this.options.function;
    let funcVersion = this.options.version;

    // versions need to be string so that AWS understands it
    funcVersion = String(this.options.version);

    this.serverless.cli.log(`Rolling back function "${funcName}" to version "${funcVersion}"...`);

    const funcObj = this.serverless.service.getFunction(funcName);

    const params = {
      FunctionName: funcObj.name,
      Qualifier: funcVersion,
    };

    return this.provider.request(
      'Lambda',
      'getFunction',
      params,
      this.options.stage, this.options.region
    )
    .then((func) => func)
    .catch((error) => {
      if (error.message.match(/not found/)) {
        const errorMessage = [
          `Function "${funcName}" with version "${funcVersion}" not found.`,
          ` Please check if you've deployed "${funcName}"`,
          ` and version "${funcVersion}" is available for this function.`,
          ' Please check the docs for more info.',
        ].join('');
        throw new Error(errorMessage);
      }
      throw new Error(error.message);
    });
  }