PHPackages                             alkurn/yii2-aws - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. alkurn/yii2-aws

ActiveYii2-extension[Utility &amp; Helpers](/categories/utility)

alkurn/yii2-aws
===============

This extension provides the AWS SDK integration for the Yii2 framework

038PHP

Since Apr 9Pushed 7y ago1 watchersCompare

[ Source](https://github.com/alkurn/yii2-aws)[ Packagist](https://packagist.org/packages/alkurn/yii2-aws)[ RSS](/packages/alkurn-yii2-aws/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

AWS SDK for Yii2 - Use Amazon Web Services in your Yii2 project
===============================================================

[](#aws-sdk-for-yii2---use-amazon-web-services-in-your-yii2-project)

This extension provides the AWS SDK 3 integration for the Yii2 framework

[![Latest Stable Version](https://camo.githubusercontent.com/e39dcfcf2327110acfe7e24f2bb3d0b22f28363115e953b8d63d18d6e7d2f46a/68747470733a2f2f706f7365722e707567782e6f72672f616c6b75726e2f796969322d6177732f762f737461626c65)](https://packagist.org/packages/alkurn/yii2-aws) [![Total Downloads](https://camo.githubusercontent.com/fc7b2df8a5053ee3c5cad546072444d3a77ef8fe0a77774a7c314acc13ede1ac/68747470733a2f2f706f7365722e707567782e6f72672f616c6b75726e2f796969322d6177732f646f776e6c6f616473)](https://packagist.org/packages/alkurn/yii2-aws) [![Latest Unstable Version](https://camo.githubusercontent.com/511eb82944a1d7706f1c174b79305682c7a89542dad7025dee9cb2ef309f9eea/68747470733a2f2f706f7365722e707567782e6f72672f616c6b75726e2f796969322d6177732f762f756e737461626c65)](https://packagist.org/packages/alkurn/yii2-aws) [![License](https://camo.githubusercontent.com/040ae6709b2b7bc7a261a9b560aa1255c81809b3c88cc01a93c16e3ae9a8c73b/68747470733a2f2f706f7365722e707567782e6f72672f616c6b75726e2f796969322d6177732f6c6963656e7365)](https://packagist.org/packages/alkurn/yii2-aws)

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

[](#installation)

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

Either run

```
php composer.phar require --prefer-dist alkurn/yii2-aws "dev-master"

```

or add

```
"alkurn/yii2-aws": "dev-master"

```

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

```
Note: You can still use AWS version 2 if you specify alkurn/yii2-aws "dev-master"

```

Usage
-----

[](#usage)

To use this extension, simply add the following code in your application configuration:

```
return [
    //....
    'components' => [
        's3' => [
            'class' => 'alkurn\aws\S3',
            'credentials' => [ //you can use a different method to grant access
                'key' => 'your-aws-key',
                'secret' => 'your-aws-secret',
            ],
            'region' => 'your-aws-region', //i.e.: 'us-east-1'
            'version' => 'your-aws-version', //i.e.: 'latest'
        ],
    ],
];
```

Getting all balancer names from AWS:

```
$aws = Yii::$app->s3->getS3();
$elb = $aws->createElasticloadbalancing();
$load_balancers = $elb->describeLoadBalancers()->toArray();
if (isset($load_balancers['LoadBalancerDescriptions'])){
    foreach ($load_balancers['LoadBalancerDescriptions'] as $balancer){
        if (isset($balancer['LoadBalancerName'])){
            echo $balancer['LoadBalancerName'];
        }
    }
}
```

Download an object from S3:

```
//specify the region if it is different than the main configuration region
Yii::$app->awssdk->region = 'sa-east-1';
$aws = Yii::$app->s3->getS3();

//use s3
$s3 = $aws->createS3();
$result = $s3->listObjects(['Bucket' => 'your-bucket-id',"Prefix" => "your-path"])->toArray();
//get the last object from s3
$object = end($result['Contents']);
$key = $object['Key'];
$file = $s3->getObject([
    'Bucket' => 'your-bucket-id',
    'Key' => $key
]);
//download the file
header('Content-Type: ' . $file['ContentType']);
echo $file['Body'];
```

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/485ae3b1c7496e2d8d100c7c12274e3e7d490afc132ef1b3a2b2a30f10727e1e?d=identicon)[gmankar](/maintainers/gmankar)

---

Top Contributors

[![TechAlkurn](https://avatars.githubusercontent.com/u/56467158?v=4)](https://github.com/TechAlkurn "TechAlkurn (8 commits)")

### Embed Badge

![Health badge](/badges/alkurn-yii2-aws/health.svg)

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

###  Alternatives

[cleaniquecoders/shrinkr

Shrinkr is a Laravel package for shortening URLs, with custom slugs, analytics, branded domains, and seamless API integration.

142.9k](/packages/cleaniquecoders-shrinkr)

PHPackages © 2026

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