PHPackages                             fedemotta/yii2-aws-sdk - 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. fedemotta/yii2-aws-sdk

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

fedemotta/yii2-aws-sdk
======================

This extension provides the AWS SDK integration for the Yii2 framework

v2.0(10y ago)15448.9k↓57.6%11[1 issues](https://github.com/fedemotta/yii2-aws-sdk/issues)2MITPHP

Since Apr 16Pushed 9y ago2 watchersCompare

[ Source](https://github.com/fedemotta/yii2-aws-sdk)[ Packagist](https://packagist.org/packages/fedemotta/yii2-aws-sdk)[ RSS](/packages/fedemotta-yii2-aws-sdk/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (5)Dependencies (2)Versions (6)Used By (2)

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/7fc6491933fcf06f2722ed4b1b05e8122ade958fafec76131509d5d9eb9562eb/68747470733a2f2f706f7365722e707567782e6f72672f666564656d6f7474612f796969322d6177732d73646b2f762f737461626c65)](https://packagist.org/packages/fedemotta/yii2-aws-sdk) [![Total Downloads](https://camo.githubusercontent.com/890d26a489b00805acfe815faf0abcd06725143e6bfed85f669aee853ee516c2/68747470733a2f2f706f7365722e707567782e6f72672f666564656d6f7474612f796969322d6177732d73646b2f646f776e6c6f616473)](https://packagist.org/packages/fedemotta/yii2-aws-sdk) [![Latest Unstable Version](https://camo.githubusercontent.com/ff104a5f4f6378da19dec729077475e5905cd9fb59e992f7f538cb8cfed16fa5/68747470733a2f2f706f7365722e707567782e6f72672f666564656d6f7474612f796969322d6177732d73646b2f762f756e737461626c65)](https://packagist.org/packages/fedemotta/yii2-aws-sdk) [![License](https://camo.githubusercontent.com/110fecd941ab65375528592e86df678c6562181eb40a6f38fe645b07b5f36603/68747470733a2f2f706f7365722e707567782e6f72672f666564656d6f7474612f796969322d6177732d73646b2f6c6963656e7365)](https://packagist.org/packages/fedemotta/yii2-aws-sdk)

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

[](#installation)

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

Either run

```
php composer.phar require --prefer-dist fedemotta/yii2-aws-sdk "*"

```

or add

```
"fedemotta/yii2-aws-sdk": "*"

```

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

```
Note: You can still use AWS version 2 if you specify fedemotta/yii2-aws-sdk "1.*"

```

Usage
-----

[](#usage)

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

```
return [
    //....
    'components' => [
        'awssdk' => [
            'class' => 'fedemotta\awssdk\AwsSdk',
            '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->awssdk->getAwsSdk();
$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->awssdk->getAwsSdk();
//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

41

—

FairBetter than 87% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity46

Moderate usage in the ecosystem

Community18

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 96.7% 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 ~59 days

Total

5

Last Release

3859d ago

Major Versions

v1.2 → v2.02015-12-10

### Community

Maintainers

![](https://www.gravatar.com/avatar/c8ab5bc7c60a7e6e78b4e838fa6645258053c8c144db4bfd519d3cdde9c9bd15?d=identicon)[fedemotta](/maintainers/fedemotta)

---

Top Contributors

[![fedemotta](https://avatars.githubusercontent.com/u/250785?v=4)](https://github.com/fedemotta "fedemotta (29 commits)")[![SaWey](https://avatars.githubusercontent.com/u/1469848?v=4)](https://github.com/SaWey "SaWey (1 commits)")

---

Tags

amazons3sdkawsdynamodbec2cloudglacieryii2extension

### Embed Badge

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

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

###  Alternatives

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.3k543.5M2.6k](/packages/aws-aws-sdk-php)[aws/aws-sdk-php-laravel

A simple Laravel 9/10/11/12/13 service provider for including the AWS SDK for PHP.

1.7k38.2M83](/packages/aws-aws-sdk-php-laravel)[aws/aws-sdk-php-resources

A resource-oriented API for interacting with AWS services

1361.9M14](/packages/aws-aws-sdk-php-resources)[aws/aws-sdk-php-silex

A simple Silex service provider for including the AWS SDK for PHP.

84628.6k2](/packages/aws-aws-sdk-php-silex)[platinumpixs/aws-symfony2-bundle

A simple Symfony 2 bundle for including the AWS SDK for PHP.

1374.3k1](/packages/platinumpixs-aws-symfony2-bundle)[iwai/aws-sdk-php-phalcon

A simple Phalcon service provider for including the AWS SDK for PHP.

224.3k](/packages/iwai-aws-sdk-php-phalcon)

PHPackages © 2026

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