lundi 30 mars 2015

Php - Amazon s3 how do I check my connection is success or not

I am using amazon-php-sdk. In my application I'm accepting key and secret value from a form and passing for connecting to Aws. Here is my code.



<?php
require 'aws-autoloader.php';
use Aws\S3\S3Client;
$s3Client = S3Client::factory(array(
'key' => 'my key',
'secret' => 'my secret key'
));
?>



  1. How do I check whether the connection is success or not ?

  2. How can I check the already created object using the passed key so I that I don't want to create the object again. I need to create the object only if the passed key is different from the already created one.





Aucun commentaire:

Enregistrer un commentaire