While I am trying to list buckets
I get the following php error:
( ! ) Fatal error: Uncaught exception 'Aws\S3\Exception\S3Exception' with message
'Error executing "ListBuckets" on "https://s3-us-west-2.amazonaws.com/";
AWS HTTP error: cURL error 60: SSL certificate problem: unable to get
local issuer certificate (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)' in
C:\wamp\www\Web_Projects\aws\Aws\WrappedHttpHandler.php on line 159
( ! ) Aws\S3\Exception\S3Exception: Error executing "ListBuckets" on
"https://s3-us-west-2.amazonaws.com/"; AWS HTTP error: cURL error 60: SSL
certificate problem: unable to get local issuer certificate (see
http://curl.haxx.se/libcurl/c/libcurl-errors.html) in
C:\wamp\www\Web_Projects\aws\Aws\WrappedHttpHandler.php on line 159
Call Stack
Code with which I am trying:
<?php
error_reporting(1);
require 'aws-autoloader.php';
use Aws\S3\S3Client;
$options = [
'region' => 'us-west-2',
'version' => 'latest',
'credentials' => [
'key' => 'AKXXXXXXLPPHXXXXXXXXXPA',
'secret' => 'a/b/c+d',
]
];
$s3Client = new S3Client($options);
$s3Client->listBuckets();
?>
What could be the reason I am getting the above error?