function getRegex(durationType) {
    switch (durationType) {
    case DURATIONS.billedDurationMs:
        return /\tBilled Duration: (\d+) ms/m;
    case DURATIONS.initDurationMs:
        return /\tInit Duration: (\d+\.\d+) ms/m;
    case DURATIONS.durationMs:
        return /\tDuration: (\d+\.\d+) ms/m;
    case DURATIONS.restoreDurationMs:
        return /\tRestore Duration: (\d+\.\d+) ms/m;
    case DURATIONS.billedRestoreDurationMs:
        return /\tBilled Restore Duration: (\d+) ms/m;
    default:
        throw new Error(`Unknown duration type: ${durationType}`);
    }
}
Extract duration (in ms) from a given Lambda's CloudWatch log.