RiakCS S3 PHP客户端库

Is there any RiakCS S3 PHP client library out there? The best I could find was S3cmd command line client software.

Also I've seen there is Riak PHP Client, but it looks like there is nothing related to S3.

I've installed aws-sdk-php-laravel and used same credentials as for RiakCS S3 but it doesn't seem to work. Error message below:

The AWS Access Key Id you provided does not exist in our records.

Thank you for any guidance or advice.

Actually, if you are using Riak, it wouldn't be a proxy, it would be a completely different endpoint. So you should do it this way with the base_url option:

$s3 = S3Client::factory([
    'base_url'       => 'http://127.0.0.1:8080',
    'region'         => 'my-region',
    'key'            => 'my-key',
    'secret'         => 'my-secret',
    'command.params' => ['PathStyle' => true]
]);

Using 'command.params' allows you to set a parameter used in every operation. You will need to use the 'PathStyle' option on every request to make sure the SDK does not move your bucket into the host part of the URL like it is supposed to do for Amazon S3.

This is was all talked about on an issue on GitHub.

aws-sdk-php-laravel uses aws-sdk-php which is hard coded to use Amazon's URLs. If you want to use that library with Riak CS, you'll need to configure it to use your node as a proxy. According to the config docs that would be set using:

use Aws\S3\S3Client;

$s3 = S3Client::factory(array(
    'request.options' => array(
        'proxy' => '127.0.0.1:8080'
    )
));

I haven't used Laravel, so I'm not sure where to put that so that it will pass the setting along to