PHPackages                             farhan928/yii2-aws-s3-client - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [File &amp; Storage](/categories/file-storage)
4. /
5. farhan928/yii2-aws-s3-client

ActiveYii2-extension[File &amp; Storage](/categories/file-storage)

farhan928/yii2-aws-s3-client
============================

Yii2 wrapper extension for aws sdk s3 client

1.0.2(7y ago)09311BSD-3-ClausePHP

Since Feb 15Pushed 7y ago1 watchersCompare

[ Source](https://github.com/farhan928/yii2-aws-s3-client)[ Packagist](https://packagist.org/packages/farhan928/yii2-aws-s3-client)[ RSS](/packages/farhan928-yii2-aws-s3-client/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependencies (1)Versions (4)Used By (0)

Yii2 AWS S3Client
=================

[](#yii2-aws-s3client)

[![@raditzfarhan on Twitter](https://camo.githubusercontent.com/aa99ef6e685905901302418a7554e0eb3969609e25f73ffd066073113cd6a429/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f747769747465722d25343072616469747a66617268616e2d626c75652e7376673f7374796c653d666c6174)](https://twitter.com/raditzfarhan)

The **Yii2 AWS S3Client** is a wrapper for AWS S3Client SDK for PHP.

Installation
------------

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

### Pre-requisites

[](#pre-requisites)

> You must have [composer](http://getcomposer.org/download/) installed on your machine.

### Install

[](#install)

Either run

```
$ composer require farhan928/yii2-aws-s3-client "^1.0.0"

```

or add

```
"farhan928/yii2-aws-s3-client": "^1.0.0"

```

to the `require` section of your `composer.json` file.

Release Changes
---------------

[](#release-changes)

> NOTE: Refer the [CHANGE LOG](https://github.com/farhan928/yii2-aws-s3-client/blob/master/CHANGE.md) for details on changes to various releases.

Usage
-----

[](#usage)

Add this code below to your main config and your are ready to go.

```
// add this in your component section
's3Client' => [
        'class' => 'farhan928\AwsS3\S3Client',
        'key' => 'YOUR_AWS_KEY',
        'secret' => 'YOUR_AWS_SECRET',
        'bucket' => 'YOUR_BUKCET',
],
```

Examples
--------

[](#examples)

### Get object URL

[](#get-object-url)

```
Yii::$app->s3Client->url('file.png');
```

### Generate and get temporary URL

[](#generate-and-get-temporary-url)

```
Yii::$app->s3Client->temporaryUrl('file.png', 5); //second argument is the duration in minute
```

### Upload raw file contents on bucket

[](#upload-raw-file-contents-on-bucket)

```
Yii::$app->s3Client->put('file.png', file_get_contents('https://i.imgur.com/hAjCMan.jpg'))
```

### Copy object to new location

[](#copy-object-to-new-location)

```
Yii::$app->s3Client->copy('old.png', 'file/new.png')
```

### Move object to new location

[](#move-object-to-new-location)

```
Yii::$app->s3Client->move('old.png', 'file/new.png')
```

### Get all files from a directory

[](#get-all-files-from-a-directory)

```
// get all files
Yii::$app->s3Client->files('path/to/your/folder/');

// get certain type of files
Yii::$app->s3Client->files('path/to/your/folder/', ['jpg', 'png']);
```

License
-------

[](#license)

**yii2-aws-s3-client** is released under the BSD-3-Clause License

### Related Links

[](#related-links)

- [AWS SDK for PHP - Version 3](https://github.com/aws/aws-sdk-php)

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~6 days

Total

3

Last Release

2680d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/8623033?v=4)[farhan928](/maintainers/farhan928)[@farhan928](https://github.com/farhan928)

---

Top Contributors

[![farhan928](https://avatars.githubusercontent.com/u/8623033?v=4)](https://github.com/farhan928 "farhan928 (18 commits)")

---

Tags

s3awsyii2extensionaws-s3s3 client

### Embed Badge

![Health badge](/badges/farhan928-yii2-aws-s3-client/health.svg)

```
[![Health](https://phpackages.com/badges/farhan928-yii2-aws-s3-client/health.svg)](https://phpackages.com/packages/farhan928-yii2-aws-s3-client)
```

###  Alternatives

[league/flysystem-aws-s3-v3

AWS S3 filesystem adapter for Flysystem.

1.7k277.8M969](/packages/league-flysystem-aws-s3-v3)[frostealth/yii2-aws-s3

An Amazon S3 component for Yii2

90710.6k5](/packages/frostealth-yii2-aws-s3)[vinelab/cdn

Content Delivery Network (CDN) Package for Laravel

217242.9k1](/packages/vinelab-cdn)[fedemotta/yii2-aws-sdk

This extension provides the AWS SDK integration for the Yii2 framework

14443.7k2](/packages/fedemotta-yii2-aws-sdk)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
