Was the error really just
Error #0: ? Or was there some more text there? You might just have an issue with the SSL setup on that server for making outgoing connections. An “error #0” with nothing else is a pretty typical symptom of that kind of problem; often the cause is that PHP just doesn’t know where the SSL certificates are located (fixable with a php.ini setting
Anyway, S3 itself will let you access the files through HTTPS just fine so it’s really just a matter of getting the adapter to emit HTTPS URLs. Changing the endpoint will change the emitted URLs since they’re created by using the endpoint as a basis, but as you’ve seen that also changes how the connection is made for uploading and deleting files.
As a workaround you could just force the URL generated to be HTTPS by changing the
uri line in
$uri = 'https:' . substr("$endpoint/$object", 5);
You could also do that in a plugin by just extending the ZendS3 adapter, overriding just
getUri() and doing a similar substr-and-prepend to the uri you’d get from calling