if (count($groups) == 0) {
            throw new \InvalidArgumentException('Could not find any matching log groups');
        } elseif (count($groups) == 1) {
            $logGroupName = $groups->getFirst()->getLogGroupName();
        } else {