public function resolve($path)
    {
        // For AWS SDK v2
        if ($this->service instanceof \Aws\Common\Client\AbstractClient) {
            return $this->service->getObjectUrl(
                $this->bucket,
                $this->computePath($path),
                $this->expiresAt
            );
        }

        // For AWS SDK v3
        $command = $this->service->getCommand('GetObject', [
            'Bucket' => $this->bucket,
            'Key'    => $this->computePath($path),
        ]);

        return (string) $this->service->createPresignedRequest($command, $this->expiresAt)->getUri();
    }