powerkernel / yii-aws-s3
Yii2 AWS S3
Package info
github.com/powerkernel/yii-aws-s3
Type:yii2-extension
pkg:composer/powerkernel/yii-aws-s3
1.0.2
2018-12-25 12:41 UTC
Requires
- aws/aws-sdk-php: ~3.0
- yiisoft/yii2: ~2.0.0
This package is auto-updated.
Last update: 2026-02-17 01:34:43 UTC
README
Yii AWS S3
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist powerkernel/yii-aws-s3 "*"
or add
"powerkernel/yii-aws-s3": "*"
to the require section of your composer.json file.
Usage
To use this extension, simply add the following code in your application configuration:
'components' => [
// ...
's3' => [
'__class' => powerkernel\s3\AwsS3::class,
'key' => 'your aws sns key',
'secret' => 'your aws sns secret',
'region' => 'us-west-2',
// 'endpoint' => '', // for digital ocean spaces https://sfo2.digitaloceanspaces.com
],
// ...
],
You can then call AWS S3 functions as follows:
Yii::$app->s3->client->put($arg);
// ...
For further instructions refer to the AWS Documentation page