问题
I pointed my subdomain to an s3 bucket, and everything works normally
URL AMAZON - /mybucket/logo.jpg
OR
MY SUBDOMAIN - / logo.jpg
Works correctly
But logo.jpg is a public archive. In theory, to get private files from a bucket, I need to use Predesigned URL so that it would look like this
AMAZON URL
Works normally, but when I try to access subdomain, it is not allowed.
MY SUBDOMAIN
I'm using this PHP code
$cmd = $client->getCommand('GetObject', [
'Bucket' => 'teste.darpine.com',
'Key' => 'cover.jpg'
]);
$request = $client->createPresignedRequest($cmd, '+10 hours');
echo $presignedUrl = (string) $request->getUri();
来源:https://stackoverflow.com/questions/45093081/problems-with-amazon-s3