Laravel 中如何使用 AWS 云服务 ?
因为工作需要,要使用AWS 的 s3 和 DynamoDb 。在https://packagist.org/packages/aws 也找到了依赖包,
加载之后,始终不能成功,希望大神指定一下。代码如下:
composer.json
"require": {
"php": ">=5.5.9",
"laravel/framework": "5.1.*",
"aws/aws-sdk-php": "^3.9"
},
控制器调用
$client = DynamoDbClient::factory( array(
'region' => 'ap-northeast-1',
'credentials' => array(
'key' => '',
'secret' => ''
),
'version' => 'latest',
));
$response = $client->listTables(array(
'Limit' => 2,
'ExclusiveStartTableName' => isset($response) ? $response['LastEvaluatedTableName'] : null
));
dd($response);
错误代码
DynamoDbException in WrappedHttpHandler.php line 152: Error executing "ListTables" on "https://dynamodb.ap-northeast-1.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)
推荐文章: