yii2-aws-s3 icon indicating copy to clipboard operation
yii2-aws-s3 copied to clipboard

Credentials must be an instance of Aws\Credentials\CredentialsInterface

Open Levon770 opened this issue 3 years ago • 1 comments

Configuring like in readme throws error

'components' => [
    // ...
    's3' => [
        'class' => 'frostealth\yii2\aws\s3\Service',
        'credentials' => [ // Aws\Credentials\CredentialsInterface|array|callable
            'key' => 'my-key',
            'secret' => 'my-secret',
        ],
        'region' => 'my-region',
        'defaultBucket' => 'my-bucket',
        'defaultAcl' => 'public-read',
    ],
    // ...
],
Credentials must be an instance of Aws\Credentials\CredentialsInterface

Based on this, the config should be

'components' => [
    // ...
    's3' => [
        'class' => 'frostealth\yii2\aws\s3\Service',
        'credentials' => new Aws\Credentials\Credentials('my-key',  'my-secret'),
        'region' => 'my-region',
        'defaultBucket' => 'my-bucket',
        'defaultAcl' => 'public-read',
    ],
    // ...
],

Levon770 avatar Aug 28 '22 08:08 Levon770

please, check https://github.com/frostealth/yii2-aws-s3/pull/50

Levon770 avatar Aug 28 '22 14:08 Levon770