I am unable to access the file, that I am trying to access through pre-signed URL.
$cmd = $s3Client->getCommand('GetObject', [
'Bucket' => 'test-bucket-pcloud',
'Key' => 'testfile.txt'
]);
$request = $s3Client->createPresignedRequest($cmd, '+20 minutes');
// Get the actual presigned-url
$presignedUrl = (string) $request->getUri();
When the URL is accessed on browser I get:
This XML file does not appear to have any style information associated with it. The document tree is shown below.
<Error>
<Code>AuthorizationQueryParametersError</Code>
<Message>X-Amz-Algorithm only supports "AWS4-HMAC-SHA256"</Message>
<RequestId>8D109D39C69E665D</RequestId>
<HostId>
lH+u+MEnbF+Sps0kd/tMEGS0ePHjQlUDGWN8lLnzkXYkrIb0YksK6ahzUflPFMbQG8zUzLFl9y4=
</HostId>
</Error>
What could be the reason for it? Also, when I try to access the bucket from the URL obtained as:
$signedURL = $s3Client->getObjectUrl('test-bucket-pcloud','testfile.txt');
I still get the same error.
Here is the permission snapshot for the bucket: