mercredi 16 septembre 2015

Cannot access S3 buckets on Amazon Web Services using PHP AWS SDK

I am trying to use the listbuckets method on aws S3 api and keep getting and error saying that my S3client object is undefined ERROR- Undefined variable: s3client in C:\XAMPPmy\htdocs.. Not sure why but any help would be awesome.

I am using my root account key and secret access credentials

php code that is trying to use S3 service -

$s3Client = new Aws\S3\S3Client([
'version'     => 'latest',
'region'      => 'us-west-2',
'credentials' => [
    'key'    => 'key',
    'secret' => 'secret',
],]);  $result = $s3client->listBuckets();




Aucun commentaire:

Enregistrer un commentaire