mercredi 14 octobre 2015

Can't connect to S3 with PHP AWS SDK

Here is literally everything I have in my PHP script:

<?

require 'vendor/autoload.php';

use Aws\S3\S3Client;

// Instantiate an Amazon S3 client.

$s3 = new S3Client([

    'version' => 'latest',

    'region'  => 'us-west-2'

]);

debug($s3);

?>

I don't know anything about $s3 because I can't get what s3 debug prints... The page just stays loading and really never finishes. I've tried checking the docs and my s3 instance and didn't found anything about permissions but CORS permissions (which is the case) and I set all operations available to MY_url

I know what I might be missing: code to specify the instance I'm connecting to. But again, I found absolutely nothing on how to do this using AWS PHP SDK and neither did I find api credentials or something alike. What am I missing here exactly? Tyvm for your help.




Aucun commentaire:

Enregistrer un commentaire