lib/plugins/aws/metrics/awsMetrics.js/AwsMetrics/extendedValidate
class AwsMetrics:  extendedValidate() {
    this.validate();

    const today = new Date();
    const yesterday = moment()
      .subtract(1, 'day')
      .toDate();

    if (this.options.startTime) {
      const sinceDateMatch = this.options.startTime.match(/(\d+)(m|h|d)/);
      if (sinceDateMatch) {
        this.options.startTime = moment()
          .subtract(sinceDateMatch[1], sinceDateMatch[2])
          .valueOf();
      }
    }

    // finally create a new date object
    this.options.startTime = new Date(this.options.startTime || yesterday);
    this.options.endTime = new Date(this.options.endTime || today);

    return BbPromise.resolve();
  }