PHPackages                             indielab/yii2s3 - 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. indielab/yii2s3

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

indielab/yii2s3
===============

Yii 2 S3 Component

2.1.1(1y ago)522.4k↓37.9%[3 PRs](https://github.com/nadar/yii2-s3/pulls)PHPPHP ^8.2CI passing

Since Dec 2Pushed 3mo ago3 watchersCompare

[ Source](https://github.com/nadar/yii2-s3)[ Packagist](https://packagist.org/packages/indielab/yii2s3)[ Docs](https://github.com/indielab)[ RSS](/packages/indielab-yii2s3/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)Dependencies (6)Versions (10)Used By (0)

Yii 2 Amazon S3 Component
=========================

[](#yii-2-amazon-s3-component)

This component allows you to work with the amazon AWS S3 buckets for uploading and finding files.

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

[](#installation)

Add the the package to your composer file:

```
composer require indielab/yii2s3
```

Add the component to your application configuration file:

```
'components' => [
    // ...
    's3' => [
        'class' => \indielab\yii2s3\S3::class,
        'bucket' => 'mybucket',
        'key' => 'KEY',
        'secret' => 'SECRET',
        'region' => 'eu-central-1',
    ],
    // ...
]
```

Usage
-----

[](#usage)

Using the component in order to upload a file:

```
Yii::$app->s3->upload('path/to/the/file.jpg');
```

Where file.jpg will be used as the key of the uploading file. Now in order to get the url to a key use:

```
$url = Yii::$app->s3->url('file.jpg');
```

### Configure Uploading

[](#configure-uploading)

You can also provide more options to the uploading configuration method:

```
Yii::$app->s3->upload('path/to/the/file.jpg', [
    'override' => true, // whether existing file should be overriden or not
    'Key' => 'CacheControlTestFile.txt', // Define a specific name for the file instead of the source file name
    'CacheControl' => 'max-age=' . strtotime('+1 year')  // Add cache controler options
]);
```

###  Health Score

50

—

FairBetter than 96% of packages

Maintenance60

Regular maintenance activity

Popularity31

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity81

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 73.3% 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 ~574 days

Recently: every ~293 days

Total

6

Last Release

582d ago

Major Versions

1.1.1 → 2.0.02024-05-11

### Community

Maintainers

![](https://www.gravatar.com/avatar/86184bf08843ed8fcc4aedb2fdecd8a9e832e47e89a7166cebfda529c176f5ce?d=identicon)[nadar](/maintainers/nadar)

---

Top Contributors

[![nadar](https://avatars.githubusercontent.com/u/3417221?v=4)](https://github.com/nadar "nadar (22 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (8 commits)")

---

Tags

s3yii2

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Rector

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/indielab-yii2s3/health.svg)

```
[![Health](https://phpackages.com/badges/indielab-yii2s3/health.svg)](https://phpackages.com/packages/indielab-yii2s3)
```

###  Alternatives

[frostealth/yii2-aws-s3

An Amazon S3 component for Yii2

90698.9k5](/packages/frostealth-yii2-aws-s3)[fedemotta/yii2-aws-sdk

This extension provides the AWS SDK integration for the Yii2 framework

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

PHPackages © 2026

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